Few-shot Prompting vs Zero-shot Prompting
Zero-shot prompting gives a model only an instruction. Few-shot prompting adds a small number of worked input-output examples so the model can infer the task and format from demonstrations, at the cost of a longer prompt and sensitivity to which examples are chosen and in what order.
Definitions
- Few-shot Prompting PTL-0009
- Few-shot prompting includes a small number of input-output examples in the prompt so the model can infer the task and the desired format from demonstrations.
- Zero-shot Prompting PTL-0008
- Zero-shot prompting asks a model to perform a task from an instruction alone, without any worked examples in the prompt.
Differences
| Few-shot Prompting | Zero-shot Prompting | |
|---|---|---|
| Prompt contents | Instruction plus several examples | Instruction only |
| Strength | Conveys formats and judgments that are hard to describe | Short and simple |
| Weakness | Results depend on example choice, order and label balance | Ambiguous when the desired format is unusual |
Which to use
- Add examples when the output format or the judgment required is hard to put into words.
- Start zero-shot with modern instruction-tuned models, and add examples only if outputs miss the mark.
Sources
- Brown et al. (2020). Language Models are Few-Shot Learners.
- Brown et al. (2020). Language Models are Few-Shot Learners.
- Wei et al. (2021). Finetuned Language Models Are Zero-Shot Learners.
Cite this page
Protologue. (2026). Few-shot Prompting vs Zero-shot Prompting. In Protologue: A Taxonomy of Prompting and LLM Techniques (v1.4.0). https://protologue.com/compare/few-shot-vs-zero-shot-prompting/