Few-shot and zero-shot are the two basic ways to prompt a language model, and the choice between them is mostly an economics question. Zero-shot gives the model instructions and nothing else. Few-shot adds a handful of solved examples inside the prompt so the model can pattern-match to them. Modern models are strong enough that zero-shot works more often than it used to — but examples still earn their keep when format and edge cases matter.
What changed in 2026
- Zero-shot got stronger. Instruction-tuned models now follow well-written directions closely, so many tasks that once needed examples now work with a clear prompt alone.
- Few-shot shifted toward format control. Rather than teaching the task, examples are increasingly used to pin down exact output structure and handle ambiguous inputs.
- Long context made bigger example sets cheap-ish. Larger windows allow more examples, but the lost-in-the-middle effect means more is not automatically better — placement still matters.
The core difference
- Zero-shot: "Classify this review as positive, negative, or neutral." The model relies entirely on its training and your instruction.
- One-shot / few-shot: the same instruction, followed by one or several labeled examples, then the new input. The examples demonstrate the task through in-context learning — the model infers the pattern without any weight updates.
Nothing is being trained here. Few-shot examples influence a single call; they do not change the model, unlike fine-tuning.
When to reach for each
| Situation |
Prefer |
Why |
| Clear, common task |
Zero-shot |
Modern models already know it |
| Strict output format |
Few-shot |
Examples pin down structure reliably |
| Ambiguous or niche task |
Few-shot |
Examples resolve what prose cannot |
| Tight token budget |
Zero-shot |
No example overhead |
| Consistent style needed |
Few-shot |
Show the voice rather than describe it |
| Very high call volume |
Zero-shot or fine-tune |
Examples multiply per-call cost |
If a task needs multi-step reasoning as well as a format, combine few-shot examples with reasoning steps — the overlap with chain of thought prompting is where a lot of prompt quality comes from.
Getting few-shot right
- Use representative examples. Choose cases that mirror the real distribution of inputs, including the awkward ones you want handled well.
- Keep them clean. A wrong or sloppy example teaches the wrong pattern; the model imitates mistakes faithfully.
- Mind the order. Models can be sensitive to example ordering and to which class appears last. Test a couple of arrangements.
- Balance the classes. For classification, avoid stacking all examples of one label together, which can bias predictions toward it.
- Stop adding when gains flatten. Two to five strong examples usually capture most of the benefit; beyond that you mostly pay tokens.
When to graduate to fine-tuning
Few-shot has a ceiling. If you find yourself pasting the same large example set into every call at high volume, the per-call token cost adds up, and the examples eat into your context budget. At that point, teaching the behavior once through fine-tuning — see LoRA vs full fine-tuning — is often cheaper and more consistent than shipping examples on every request.
FAQ
Is zero-shot always cheaper than few-shot?
Per call, yes, because it sends fewer tokens. But if zero-shot needs retries or produces inconsistent formats, a few well-chosen examples can be cheaper overall by getting it right the first time.
How many examples is ideal for few-shot?
Usually two to five. Gains tend to flatten after that, and more examples raise cost and risk the model losing track of instructions in a long prompt.
Does few-shot train or change the model?
No. It is in-context learning that lasts only for that one request. To change the model's behavior persistently, you need fine-tuning.
Why do my few-shot results change when I reorder examples?
Models are sensitive to context order, and the last example often carries extra weight. If ordering swings your results, that is a signal to test arrangements and balance the examples.
Where to go next