Prompting basics
How to phrase a request so that something usable comes back: the five parts every good prompt has.
The five parts
| Part | Answers | Example |
|---|---|---|
| Role | From whose view? | "You are a procurement officer." |
| Task | Do what exactly? | "Summarise this quote in five points." |
| Context | What must be known? | "We are comparing three quotes for the same tender." |
| Format | What should it look like? | "As a table with item, price, lead time." |
| Limits | What not to do? | "No assessment, no recommendation, no invented values." |
The fifth part is the most often forgotten and does the most work. Otherwise a model does what it takes to be helpful, and that is often more than wanted.
An example that shows the difference
Weak: "Summarise this."
Good: "You are a procurement officer. Summarise the following quote in at most five bullet points. Name only items, prices and lead times that appear in the text. Where a value is missing, write: not stated. No assessment."
What actually works
- 01
Examples rather than descriptions
Two to five examples of the input and output you want do more than any description of the format, however precise.
- 02
The invariant part first
Role, rules and fixed constraints at the front. That is clearer and also enables prompt caching, which lowers cost.
- 03
One task per prompt
Summarising and assessing in one step gives worse versions of both than two separate steps.
- 04
An exit clause
"If the information is not in the text, answer: not contained." That single line noticeably reduces invented statements.
The dials that go with it
| Task | Temperature |
|---|---|
| Extracting fields from a document | 0 |
| Classifying | 0 |
| Summarising | 0.3 |
| Drafting a customer letter | 0.5 |
| Brainstorming | 0.9 |
Treating prompts like code
- Version them, with a date and a responsible person.
- Measure against a fixed evaluation set before a new version goes live.
- Log changes; a changed prompt is a system change.
- Keep the system prompt separate from the user prompt and release them separately.
Enforcing structured output
For anything that gets processed further, free text is the wrong output. Demand a fixed schema and validate it programmatically:
{
"items": [{"description": "…", "quantity": 0, "unit_price": 0}],
"lead_time_days": 0,
"missing_fields": ["…"]
}The missing_fields key is the trick: it gives the model a place for what it does
not know and makes gaps visible rather than letting them be filled.
What prompting does not solve
- Missing knowledge. That needs retrieval, see RAG.
- Arithmetic. That needs a tool.
- Currency. That needs a dated source.
- Reliability under load. That needs measurement and a review step.
The skeleton to fill in
FREE ACCOUNT
Prompt skeleton
A skeleton of five fields that turns a vague request into an instruction, plus the sentences that are almost always missing.
Templates2 items
Related courses and sources
Short courses on AI tooling
Units of around an hour on prompting, retrieval over your own documents, agents and evaluation. Free, and close to what is actually being deployed.
For practitioners with a specific question; a unit takes about an hour.