"Few-shot prompting" is a technical-sounding name for a very simple idea: instead of explaining a task in the abstract, you show the model a couple of worked examples and let it infer the pattern. It's one of the highest-leverage techniques for getting consistent output.
- Examples remove ambiguity that word descriptions leave open.
- Two or three well-chosen examples usually establish the pattern.
- Keep examples consistent in length and style, or the pattern gets muddled.
Why examples beat descriptions
Describing a desired tone or format in words leaves a lot open to interpretation. An example removes the ambiguity — the model can copy the pattern directly instead of guessing what you meant by "professional but friendly."
How many examples do you need?
Often just two or three. The goal isn't to cover every case, it's to establish the pattern — the input/output shape, the tone, the level of detail. More examples help with edge cases, but the biggest jump in quality usually comes from zero examples to a couple.
Keep the examples consistent
If your examples vary wildly in length or style, the model has no clear pattern to lock onto. Consistency in the examples produces consistency in the output — that's the entire mechanism.
Frequently Asked Questions
What is few-shot prompting?
Including a couple of worked examples of the input/output you want directly in the prompt, so the model can copy the pattern instead of guessing from a description.
How many examples should I include?
Usually two or three is enough to establish the pattern — more examples mainly help with edge cases, not the core quality jump.