Prompt engineering: writing instructions that actually work
Prompt engineering is the practice of writing, testing and adjusting the instructions you give an AI model so that its answers become more dependable. It matters as much to everyday ChatGPT users as to developers building an AI agent.
Data as of October 22, 2026
Key figures
| Level | Intermediate |
|---|
The short version
A prompt is the instruction you give an AI. Prompt engineering is the methodical work of improving that instruction: stating the goal, supplying the context the model needs, setting an output format, then checking whether the answer genuinely gets better. The word “engineering” is there for a reason: you test and compare versions rather than relying on a hunch.
A concrete example
Take a routine request: “Summarise these meeting notes.” You will get a summary, but its length and tone are anyone’s guess. A worked version reads: “You are the assistant to a sales team. Summarise these notes in no more than five bullet points, starting with decisions made, then action items with their owner. If something is missing, write ‘not stated’ instead of guessing.”
The second version adds a role, an audience, a structure, a limit and a rule against making things up. In a business tool, those fixed instructions would live in the system prompt, and only the meeting notes would change from one call to the next.
Why it matters
The same model can give a mediocre or an excellent answer depending on how it is asked. In a one-off chat you can simply rephrase. In an agent or an automated workflow nobody is there to rephrase, so the quality of the instruction directly sets how reliable the whole system is. Official documentation such as Anthropic’s prompt engineering guide recommends defining success criteria and a way to measure them before you start tweaking the prompt at all.
Two of the best-known techniques are few-shot prompting, where you show the model worked examples, and chain of thought, where you ask it to lay out its reasoning.
Common myths
- “There are secret prompts that always work.” Lists of miracle phrases age quickly: a trick that helped one model may do nothing on the next release.
- “Longer prompts are better prompts.” A long but muddled prompt buries the useful information. Precision beats length.
- “A good prompt eliminates mistakes.” It reduces them. Hallucinations can still happen, and sensitive topics still need a human check.
- “It’s only for developers.” The same principles improve an ordinary conversation with any assistant.
Related terms and next steps
Context engineering widens the lens to everything the model receives (documents, history, tool results), not just the instruction itself. Prompt injection, on the other hand, is an attack in which hostile text hijacks a model’s instructions. To practise, try the site’s prompt generator, which helps you build a structured prompt step by step.
Related terms
- Prompt · The text, question or instruction you give an AI to get a response; how clear it is directly shapes the result.
- System prompt · Background instructions given to a model before the conversation starts (role, tone, rules) that shape every answer that follows.
- Few-shot prompting · A technique where you include a few worked examples of input and expected output in the prompt to show the model what you want.
- Chain of thought · Getting a model to write out intermediate reasoning steps before its final answer, which helps on multi-step problems.
- Context engineering · The practice of deciding what goes into a model's context window at each step: instructions, tools, documents, memory and history.
- Prompt injection · An attack that slips hidden instructions into text an AI reads, to make it ignore its original instructions or act against its user.
Try it
Full glossary
Frequently asked questions
Do I need to memorise magic phrases to write a good prompt?
No. The official guides from model makers focus on clarity, context and examples. A precise request in plain English beats a string of keywords that are supposed to unlock the model.
Is prompt engineering still worth learning now that models are smarter?
Yes, but the emphasis has shifted. Newer models cope better with vague requests, so the gains come less from clever wording and more from the context you supply, the output format you ask for and how you check the result.
Will a prompt that works on one model work on every model?
Not necessarily. Each model responds a little differently, and even a new version of the same model can change behaviour. If a prompt runs inside a tool, retest it on the model you actually use.
How is it different from fine-tuning?
Prompt engineering leaves the model untouched and only changes the text you send. Fine-tuning retrains the model on your own data, which costs more and is usually kept for cases where good instructions are no longer enough.
Data sources
Data as of October 22, 2026
Report an error
Does a figure, a date or a fact look wrong? Tell us: every report is checked.