Practice · Established · Beginner
Few-Shot Learning
Including a handful of worked examples in the prompt so the model infers the pattern you want.
What Few-Shot Learning is
Few-shot prompting communicates format, tone and edge-case handling far more efficiently than describing them in prose.
How it works
Two to eight diverse, correct examples are placed before the real input, in exactly the output format required. Examples should cover boundary cases, since the model imitates what it sees, including mistakes.
Why it matters
It is usually the fastest route from an unreliable prompt to a consistent one, and often removes the need to fine-tune at all.
Common uses
- →Consistent structured output
- →Classification with custom labels
- →Style matching
- →Data transformation
Strengths
- ✓Big consistency gains
- ✓No training required
Watch for
- ✓Consumes context tokens
- ✓Poor examples teach poor behaviour
Continue exploring
More in this collection
Browse all AI Concepts