On this page
Definition
Few-shot prompting is a prompting technique that includes a small number of input/output examples in the prompt to steer the model toward the desired format or behaviour.
Simple explanation
Instead of only describing what you want, you show it: 'Here are three good examples. Now do the fourth.' Models are excellent at matching patterns.
Why it matters
For tasks with specific format requirements — JSON, tables, tone, structure — few-shot often beats fine-tuning on cost and speed.
How it works
- 1Show examplesPaste 2-5 high-quality input/output pairs.
- 2Add new inputThen provide the real input.
- 3Model matches patternIt produces output in the same shape.
Real examples
Products named for illustration only. Inclusion is not an endorsement.
- Structured data extractionExtracting invoice fields, contract clauses, etc.
- Tone matchingMarketing copy in a specific brand voice.
Advantages
- No training required.
- Rapid to iterate.
- Big quality jumps on structured tasks.
Limitations
- Consumes context window.
- Bad examples produce bad output.
Common misunderstandings
- ClaimFew-shot teaches the model permanently.RealityExamples only affect the current call.
Frequently asked questions
How many examples is 'few'?
Usually 2 to 5. More rarely helps and always costs tokens.
The Tool Money Lab perspective
Few-shot is under-used. When teams struggle with LLM output quality, adding one or two great examples usually beats a week of prompt tinkering.
Conclusion
Few-shot prompting is the fastest quality upgrade in the prompt engineering toolkit. Show, then ask.