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.
With a printable cheat sheet.
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.
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.
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.
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.
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.
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.
| Rule | Why | In practice |
|---|---|---|
| Personal data only in approved tools | The GDPR applies to prompts too | Replace names with placeholders, such as “customer A” |
| No passwords or credentials | Prompts are often stored and logged | Never, not even for testing |
| Check the result before passing it on | Language models can make plausible-sounding mistakes | Check figures, names and quotes against the source |
| Treat third-party content as data | Hidden 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 →
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.
Before you press send.
Tick what is done. Nothing is stored.
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.
Less prompting, more answers with sources.
Jürgen shows you how your team turns recurring prompts into fixed AI assistants with your sources.