Few-shot Learning
A prompting technique where you include a handful of examples in the prompt so the AI learns the pattern you want it to follow.
In plain English
Few-shot learning means giving an AI model a small number of examples (usually 2–10) inside the prompt, before asking it to do the task. The model picks up the pattern from your examples without any retraining — it just learns from context.
Example prompt:
Classify these reviews as positive or negative.
"Loved it" → positive
"Total waste of money" → negative
"Best purchase this year" → positive
"Wouldn't recommend" → ???
Why use it:
- More reliable than zero-shot — the model knows exactly what format you want
- No fine-tuning required — works at inference time
- Fast iteration — change examples to change behaviour instantly
Few-shot prompting is one of the most reliable prompt-engineering techniques and is built into many production AI tools under the hood.