protologue

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 PromptingZero-shot Prompting
Prompt contentsInstruction plus several examplesInstruction only
StrengthConveys formats and judgments that are hard to describeShort and simple
WeaknessResults depend on example choice, order and label balanceAmbiguous 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

  1. Brown et al. (2020). Language Models are Few-Shot Learners.
  2. Brown et al. (2020). Language Models are Few-Shot Learners.
  3. 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/

Markdown