Few-shot
Giving the model a handful of worked examples in the prompt to show it the pattern you want.
Think of it like
Like a recipe with a few sample plates photographed — you copy the style for the next dish.
Example
Before asking for a product description, you include three examples of the exact tone and length, and the model matches them.
How it actually works
Few-shot prompting supplies several input→output demonstrations so the model infers the task and, crucially, the format. It usually beats zero-shot on tricky or structured tasks, but examples cost tokens and their choice and order can noticeably sway the result — so curation matters.
For product teams
The cheapest reliable quality boost before you consider fine-tuning.
For engineers
Prompting with k demonstrations to steer task and format via in-context learning; sensitive to example selection and order.
Related
- Zero-shot — None-example version.
- One-shot — Single-example version.
- In-context learning — Why it works without training.
Read anything AI without the jargon
Look up any term in plain English, or save terms as you read with the free Chrome extension.
Open DecoderAdd to Chrome