The short version
- You can ask with no examples (zero-shot) or with a few examples (few-shot). Examples usually improve consistency.
- A model copies the pattern in your examples: the format, the tone and the level of detail.
- Choose examples that cover the range of real cases, including a hard one.
The idea
A model can learn a task from the prompt itself, with no change to the model. This is called in-context learning.
- Zero-shot prompting gives an instruction and no examples. It works for common tasks.
- Few-shot prompting adds a few worked examples of input and ideal output. The model continues the pattern.
- Role prompting tells the model whose point of view to take, such as a credit analyst or a safety engineer, which shapes vocabulary and focus.
Training a new team member works the same way. You can describe a good call note for ten minutes, or you can hand over three good call notes and say “like these”. The examples are faster and clearer.
- Instruction
- Example 1
- Example 2
- Example 3
- The new case
Examples carry a risk. The model copies them closely, including their flaws. If all three examples are short, the output will be short. If all three are about one product line, the model may lean toward that line.
An example
A sales operations team wants call notes sorted into four categories: price objection, delivery issue, technical question, new opportunity. With an instruction alone, the model sorts well but uses slightly different labels each time. The team adds five examples, at least one for each category and one unclear note labelled with the reason. The labels become exact, and the unclear cases are handled the way the team wants.
Common mistakes
- Examples that are all easy cases.
- Examples that disagree with the written instruction.
- Too many examples, which uses up the context window and adds cost.
- Using real customer data in examples without checking privacy rules.
What to do this week
- Pick one task where the output format varies.
- Add three to five examples that cover the normal case, an edge case and a “do not answer” case.
- Measure consistency before and after on 20 inputs.
The terms, in plain language
| Term | What it means |
|---|---|
| Zero-shot | Asking with an instruction and no examples |
| Few-shot | Asking with a few worked examples |
| In-context learning | The model learns the task from the prompt, with no retraining |
| Role prompting | Telling the model whose viewpoint to take |
Further reading
Section 2.2 of the AI Engineering Guide · Last reviewed November 2026




