On this page
What you type, and everything you send along
A prompt decides how good an AI answer is more than the model itself does. Type 'summarise this email' into ChatGPT and that is your prompt. When a developer builds a chatbot for your website, they write a fixed prompt that travels with every visitor's question: who the chatbot is, what it may do and where its answers come from.
Prompt engineering is the craft behind it. OpenAI defines it as writing effective instructions for a model so that it consistently generates content that meets your requirements. Consistently is the key word: a prompt that gives one good answer is not yet a good prompt.
The theatre, then the language model
Prompt comes from the theatre: the person who whispers an actor's forgotten line prompts them. Dictionaries such as Cambridge now list a second meaning: to give an instruction to an artificial intelligence. The shift started with GPT-3. In May 2020, OpenAI showed with that model that a language model can pick up a new task from a few examples or a simple instruction in the request, without extra training. From then on the prompt became the way to steer software, and Anthropic and OpenAI published their own guides on doing it well. What happens when someone other than you writes part of the prompt is covered under prompt injection.
Five parts of a good instruction
The guides from Anthropic and OpenAI use different words but land on the same five parts. Anthropic sums it up in one image: treat the model as a brilliant new employee who knows nothing about your company. Everything that colleague needs to know belongs in the prompt.
| Part | What goes in | What the guides advise |
|---|---|---|
| Role | Who the model is and who it works for | Anthropic: one sentence in the system prompt already makes a difference. OpenAI: open with the assistant's identity |
| Task | Exactly what it must do, with a verb | Be clear and direct; use a numbered list when the order of steps matters |
| Context | What the model cannot know, and why a rule exists | Anthropic: give the reason behind an instruction, the model generalises from it. OpenAI: put changing context near the end |
| Examples | A few real answers that were good | Anthropic: three to five, varied, in example tags. OpenAI calls it few-shot learning |
| Format | Length, tone, structure, what you want back | Both: state the format you expect and separate parts with Markdown or XML tags |
Anthropic offers a simple test: show your prompt to a colleague who does not know the task. If they would be confused, the model will be too.
An installer, before and after
Before
Write a reply to this email.
You get a generic email you end up rewriting.
After: the same task, with what a new colleague would also need to know
Prompt in five parts, the customer's email at the bottom
You are the sales desk of an installer near Utrecht that fits heat pumps in the region.
Reply to the quote request between the <email> tags and offer a free site visit.
Give no price: insulation and radiators set the price, and we only see those on site. We visit on Tuesdays and Thursdays.
<example>A reply we sent before and liked.</example>
At most 120 words, short and friendly, no jargon. End with two dates. Return only the email text.
<email>{{the customer's email}}</email>
- RoleWho the model is and who it writes for. One sentence is enough.
- TaskWhat exactly it must do, with a verb.
- Context with the reasonWhat the model cannot know, and why a rule exists.
- ExamplesThree to five real replies steer tone and format best.
- FormatLength, tone and what you want back, so you cut nothing.
A made-up example. The tags keep your instruction and the customer's text apart.
Twenty quote requests a week, before and after
Say a heat pump installer near Utrecht receives twenty quote requests a week through its contractor website. A staff member lets ChatGPT draft a first reply with the prompt 'Write a reply to this email.' The model does its best: a polite, generic email, sometimes with a price range it makes up, and no offer of a site visit. The staff member rewrites half of it.
With the five parts from the figure, the model knows who it is, that it may not quote a price and why, when visits are possible, what a good reply sounds like and how long it may be. The difference is not in clever wording but in information only the company has. Which model writes best depends on the task: see ChatGPT vs Claude.
One line against five parts
- Tone
- One-line promptGeneric and polite, not yours
- Five-part promptLike your earlier replies, from the examples
- Price
- One-line promptSometimes an invented price range
- Five-part promptNo price, with the reason: a site visit first
- Next step
- One-line promptVague: feel free to get in touch
- Five-part promptTwo concrete dates for a visit
- Length
- One-line promptWhatever the model picks
- Five-part promptAt most 120 words, the email text only
The long prompt takes an hour to write and saves that hour every week.
Checks before you put it to work
- Is there a one-sentence role: who the model is and who it writes for?
- Does the task start with a verb, with steps in order where order matters?
- Does every rule carry its reason, so the model handles cases you did not foresee?
- Are there three to five real examples that differ from each other?
- Is the customer's text separated from your instruction, with tags?
- Do you state how long the answer may be and what you want back?
- Did you test the prompt on twenty real cases, including the awkward ones?
When the instruction lives inside your software
In a chat you write a prompt, read the answer and adjust. In software the prompt is fixed and runs thousands of times with nobody reading along. That changes the job. OpenAI advises pinning a fixed model version and building tests that measure how the prompt performs, so you see what changes when you edit the prompt or switch models. Anthropic starts one step earlier: first decide what a good answer is and how you will test it, then refine the prompt.
Two terms come up. The system prompt is the fixed instruction the builder writes; the user prompt is what the customer or employee types. Prompt chaining splits a large task into steps, each with its own prompt: pull the facts from a document, then write a reply, then check it.
What a prompt costs
A prompt is text, and text is paid for in tokens. Say a chatbot has a 500-word system prompt and answers 10,000 questions a month. In Dutch, at 1.67 tokens a word, that is 8.35 million tokens: on Claude Sonnet 5.5 at 2 dollars per million, almost 15 euros a month for the fixed instruction alone; in English, about 11 euros. Let the provider cache it and a repeated block costs 0.10 dollars per million: under one euro. Work out your own volume with the AI cost calculator.
Prompts typed into a free chat tool are a different matter: whatever you paste leaves your company. Under the EU AI Act and the GDPR, it pays to put in writing what staff may and may not paste into a prompt; see do I need an AI policy. Want an assistant that knows your own documents without pasting them each time? Look at RAG, where the model looks up the right passage at the moment of the question.
Four questions from practice
What is a system prompt?
The fixed instruction the builder of an AI application writes, sent along with every question: who the model is, what it may do, which sources it uses and how it answers. Users never see it; they only type their own question.
Should I prompt in English for better answers?
No. The large models work well in French, German or Dutch. Write the prompt in the language of the answer you want, so the model does not have to translate. English does cost fewer tokens, about a quarter less than Dutch for the same text, which only matters at thousands of calls.
How long can a prompt be?
As long as it needs to be, as long as everything fits in the context window. A good system prompt is often one to two pages. Put long documents at the top and the question at the end: Anthropic reports up to 30 percent better answers that way for long inputs.
Do I need to learn prompt engineering?
For daily use, the five parts on this page are enough. For an application that runs thousands of times, testing matters more than wording: you measure the prompt on real cases and fix it where it fails.
