TL;DR - Show the AI 2-3 examples of what you want before the real request. "Few-shot" prompting locks in format and voice far better than describing them in words.
Why it matters
Telling the model "use a friendly tone" is fuzzy. Showing it two friendly examples is exact. Few-shot is the most reliable way to get consistent, on-brand output - for labels, templated copy, data extraction, anything repeated.
Worked example
Classify each review as POSITIVE, NEGATIVE, or NEUTRAL.
"Shipped late but the product is great." -> POSITIVE
"Stopped working in a week." -> NEGATIVE
"It's fine, nothing special." -> NEUTRAL
"Support ignored me for days." ->
The examples pin the labels and format exactly. Ask cold (zero-shot) and you'll get inconsistent wording instead.
Steal this skeleton
[Instruction].
Here are examples of the format I want:
[input 1] -> [ideal output 1]
[input 2] -> [ideal output 2]
Now do the same for: [real input]
Common mistakes (and the fix)
- Zero examples for a format-critical task. Fix: give 2-3 representative ones, including a tricky case.
- Inconsistent examples. If your samples disagree, so will the output. Keep them clean.
- Too many examples. 2-4 is usually enough; more just costs tokens.
Good to know
Few-shot works in every assistant and is the backbone of reliable automations (Level 4) and API calls (Level 5) - when AI feeds another system, examples are how you guarantee the shape. Pair it with chain-of-thought (next lesson): show examples that include the reasoning.