NewRAGSuite Engine: the knowledge engine for your data, run in Germany.About RAGSuite Engine

ProductRAG enginePlatform overviewAI governanceAI chatbotBuild AI assistantsAI searchAI knowledge baseConnectors & integrationsMCP serverTake the product tour →
Engine & self-hostedRAGSuite EngineSelf-hosted / on-premiseOpen source (Community)RAGSuite Engine or self-hosted? →
SolutionsSMEsHealthcarePublic sectorBanking & insuranceChatGPT alternativeAgencies & partnersAll solutions →
Case studies
Pricing
ResourcesGuidesBlogFree toolsAI data protectionEU AI ActTrust Center
Open source on GitHub
Start free trialBook a demo
Guide · Prompt engineering

Prompt engineering: eight techniques for better answers from AI

Prompt engineering is the skill of instructing an AI so that the result fits. Eight techniques get you better answers with fewer follow-ups. This guide shows each technique with an example from everyday work and explains what must never go into a prompt for data protection reasons.

Promptbefore / after
Before
“Write an email to the new apprentices.”
After
RoleHead of training
TaskInvitation to onboarding day
ContextMarch 3, 9 am, room 2.14
Formatmax. 120 words, formal tone
Limitdo not invent details

Key points

  • Good prompts have five parts: role, context, task, format and limits. What the AI cannot know, you have to provide.
  • For facts from your company, clever wording helps little. What counts here are sources the AI answers from and cites.
  • Names, health data, passwords and trade secrets belong only in approved tools, or not in a prompt at all.
Definition

What is prompt engineering?

Prompt engineering is the deliberate wording of instructions to a language model so that it solves a task reliably. A prompt contains the task, the necessary context, the desired format and limits. The less the AI has to guess, the better and more consistent the results become.

Many techniques that help in everyday work were studied and popularised in research on language models, such as examples in the prompt (Brown et al. 2020) or asking for intermediate steps (Wei et al. 2022). Fraunhofer IESE (German) offers an introduction.

Anatomy of a good promptorder
plus limits and sources
RoleContextTaskFormat
Check the result, refine the prompt, save it as a template
Techniques

Prompt engineering techniques: eight that work in daily life.

You do not need all eight in every prompt. For a short question, task and format are enough. For texts that go out, role, context and limits pay off.

1 · Name the role and goal

From which point of view should the AI answer, and what is the result for? Example: “Role: head of training. Goal: invitation to onboarding day.”

2 · Give context

Audience, occasion, prior knowledge. Example: “The readers are first-year apprentices and do not know our ticket system yet.”

3 · State the task precisely

One verb, one result, one task per prompt. Example: “Summarise the minutes in five bullet points, decisions first.”

4 · Set the format

List, table, email, length, tone. Example: “Answer as a table with the columns task, owner, deadline.”

5 · Show examples

One or two examples of the result you want, also called few-shot (Brown et al. 2020). The AI adopts structure and style.

6 · Work step by step

For calculations and trade-offs, ask for the intermediate steps first, then the result (Wei et al. 2022; Kojima et al. 2022).

7 · Set limits

What the AI should not do and what happens when details are missing. Example: “If a detail is missing, write ‘not in the document’. Do not invent figures.”

8 · Attach sources

Provide the document and ask for the passage. The principle behind retrieval-augmented generation (Lewis et al. 2020): answers from sources instead of memory.

Build your own prompt with the prompt generator →

Example

Turning a weak prompt into a good one.

“Write an email to the new apprentices.” With this prompt the AI has to guess almost everything: the occasion, the date, the tone, the length. The result sounds friendly but is useless because the facts are missing or invented.

The revised prompt on the right uses five of the eight techniques. It is longer, but it saves the rounds in which you correct things. Save good prompts like this one as a template for next time.

Example prompt
Role: You are head of training at an engineering company.
Task: Write an invitation to the onboarding day for the new apprentices.
Context: Date March 3, 9 am, room 2.14. Bring: ID, bank details.
Audience: aged 16 to 19, first working day.
Format: email, at most 120 words, formal tone, friendly and clear.
Limits: Do not invent other dates or names.
At work

Prompt engineering at work: data protection and security.

What goes into a prompt often leaves your company. With public AI tools it ends up with the provider, and depending on the contract it may also be used for training. That is why prompt engineering at work needs rules, not just technique.

Since 2 February 2025, Art. 4 of the EU AI Act has applied: companies that use AI take measures for the AI literacy of their staff. Good prompting and the safe handling of data are part of it. This text is not legal advice.

RuleWhyIn practice
Personal data only in approved toolsThe GDPR applies to prompts tooReplace names with placeholders, such as “customer A”
No passwords or credentialsPrompts are often stored and loggedNever, not even for testing
Check the result before passing it onLanguage models can make plausible-sounding mistakesCheck figures, names and quotes against the source
Treat third-party content as dataHidden instructions in texts (prompt injection)Do not let the AI follow instructions from pasted emails or web pages

Personal data in AI systems →Create an AI usage policy →AI literacy duty →

Next step

From a good prompt to an AI assistant.

If you rewrite the same prompt every week, you waste time. In RAGSuite every AI assistant gets fixed instructions and your sources; you choose the language model per project. Your team just asks the question, and the answer comes with a reference.

The same applies to agents on a larger scale: the instructions become rules that apply at every step. The AI agents guide explains what to watch.

Build AI assistants →

Prompt check

Before you press send.

Tick what is done. Nothing is stored.

Jürgen Pietschmann
Want to standardise prompts across your team?Jürgen Pietschmann · AI Consultant · RAGSuite Lead
FAQ

Questions about prompt engineering.

What is prompt engineering in simple terms?

Prompt engineering means wording instructions to an AI so that the answer is useful. That includes a clear task, the necessary context, a desired format and limits, such as what should happen when information is missing. If you master it, you get better results with fewer follow-up questions.

What prompt engineering techniques are there?

The best known are zero-shot (task without an example), few-shot (with one or two examples), chain of thought (ask for intermediate steps), role prompts and fixed output formats. In everyday work, context, limits and attaching sources come on top. The eight techniques on this page cover most tasks.

Is prompt engineering still needed as models get better?

Yes, but differently. Newer models also understand short instructions. What they cannot know stays the same: your context, your audience, your documents and your rules. So the work shifts away from clever wording and towards the right context and good, reliable sources.

How do I learn prompt engineering?

Fastest with real tasks from your daily work. Take one task, write a prompt using the eight techniques, compare the result with your first attempt and save what works. The cheat sheet on this page and our prompt generator help you get started.

What must not go into a prompt?

Personal data such as names, contact or health data only in tools your company has approved for it. Passwords, credentials and account numbers never go in. Trade secrets only in tools with a contract that covers confidentiality and rules out training on your data. If in doubt, ask your data protection team.

Jürgen Pietschmann
Jürgen Pietschmann
AI Consultant · RAGSuite Lead

Less prompting, more answers with sources.

Jürgen shows you how your team turns recurring prompts into fixed AI assistants with your sources.