Zero-shot vs few-shot prompting
Zero-shot and few-shot describe how many examples you put in a prompt. Zero-shot gives the model none; it relies entirely on the instruction. Few-shot includes a small number of worked examples before the real task. One-shot is the special case of exactly one.
These terms come up constantly in prompt engineering, and the choice between them is one of the most practical decisions you make. This page covers what they mean and how to pick.
Last reviewed
What is zero-shot prompting?
A zero-shot prompt simply asks for what you want and trusts the model to know how. Modern models are good enough that this works for a large share of everyday tasks: summarise this, translate that, draft an email, explain a concept.
The advantages are obvious. It is the shortest prompt, the cheapest in tokens, and the fastest to write. For common, well-understood tasks, adding examples often adds nothing.
Summarise the paragraph below in two sentences for a non-technical reader.
What is few-shot prompting?
A few-shot prompt includes a handful of examples that demonstrate the exact mapping from input to output. The examples pin down format, tone, and edge behaviour in a way words struggle to. This is the technique to reach for when the output shape is specific, unusual, or hard to describe.
The cost is length. Every example is sent on every call, so a few-shot prompt is larger and slightly slower and more expensive. The trade is consistency: on pattern-based tasks, examples buy you reliable, uniform output.
Rewrite each phrase in our brand voice (warm, plain, slightly dry). Input: "Synergise your workflow." Output: "Get more done without the buzzwords." Input: "Unlock your potential." Output:
Should you use zero-shot or few-shot?
Default to zero-shot. It is faster to write and good enough for most tasks. Switch to few-shot when one of these is true.
- The output needs a specific or unusual format that is easier to show than to describe.
- You want consistent results across many similar inputs, such as classification or extraction.
- Zero-shot keeps getting the tone or structure slightly wrong despite clear instructions.
- The task uses your own labels or conventions the model could not be expected to guess.
How does chain-of-thought fit in?
Zero-shot and few-shot describe how many examples you give. Chain-of-thought describes whether you ask the model to reason step by step. The two ideas combine: you can have zero-shot chain-of-thought (no examples, but a request to reason) or few-shot chain-of-thought (worked examples that include the reasoning). They answer different questions, so it is worth keeping them separate in your head.
Key takeaways
- Zero-shot gives no examples; few-shot gives a handful; one-shot gives exactly one.
- Default to zero-shot for common tasks: it is shorter, cheaper, and usually enough.
- Switch to few-shot for specific formats, consistent batch output, or when zero-shot keeps missing.
- Few-shot and chain-of-thought are independent choices and can be combined.
See how your prompt scores
Paste any prompt into the free Promptrace scorer and get an instant breakdown across all seven dimensions. No signup.
Open the prompt scorer →Frequently asked questions
What is the difference between zero-shot and few-shot prompting?
Zero-shot prompting gives the model no examples and relies on the instruction alone. Few-shot prompting includes a small number of worked examples that demonstrate the output you want. Zero-shot is shorter and cheaper; few-shot is more consistent for specific or unusual formats.
Should I use zero-shot or few-shot?
Default to zero-shot, since it is faster and works for most everyday tasks. Switch to few-shot when the output needs a specific format, when you want consistent results across many similar inputs, or when zero-shot keeps getting the tone or structure slightly wrong.
Sources and further reading
Related guides
Few-shot prompting
Show the model one or two worked examples of what good looks like. The most reliable steering technique.
TechniquesChain-of-thought
Ask the model to reason step by step. Why it helps on hard problems, and when to skip it.
FrameworksRACE
Role, Action, Context, Expectation. The four-part framework Promptrace is named after.