Zero-shot prompting is asking an AI model to perform a task using only instructions, without giving any examples of the desired output. The model relies entirely on the knowledge and skills it gained during training. “Translate this sentence into Hindi” or “Classify this review as positive or negative” are zero-shot prompts.
Key takeaways
- “Zero-shot” means zero examples in the prompt.
- It works well for common, clearly defined tasks.
- It is the fastest and cheapest way to prompt, using fewer tokens.
- For unusual formats, tone or labels, few-shot prompting is often more reliable.
- Instruction-tuned models made zero-shot prompting far more effective.
Zero-shot prompting explained in simple terms
If you ask an experienced editor to “proofread this paragraph”, you do not need to show them an example of proofreading. They already know how. Zero-shot prompting treats the AI the same way: it assumes the model already understands the task from training and just needs clear instructions.
Why zero-shot prompting works
Large language models are pre-trained on huge amounts of text containing countless examples of translation, summarisation, question answering and classification. They are then instruction-tuned: trained on many tasks written as instructions, so they learn to follow new instructions they have not seen before. This is why modern assistants handle so many tasks with no examples at all.
Zero-shot vs one-shot vs few-shot
| Approach | Examples in prompt | Best for |
|---|---|---|
| Zero-shot | 0 | Common tasks with clear instructions |
| One-shot | 1 | Showing a specific format once |
| Few-shot | Usually 2–10 | Custom formats, tone, labels or tricky edge cases |
Worked examples
Classification:
“Classify the following customer review as Positive, Negative or Neutral. Reply with one word only.
Review: The delivery was late but the product quality is excellent.”
A good model will usually answer “Positive” or “Neutral”. Notice the ambiguity: mixed reviews are exactly where zero-shot results become inconsistent. Adding a rule (“If the review mentions both a problem and praise, choose Neutral”) or examples fixes this.
Extraction:
“From the email below, extract the sender’s company name, the requested meeting date and the product mentioned. If any field is missing, write ‘Not found’.”
Transformation:
“Rewrite this paragraph for a 12-year-old reader, keeping all key facts.”
How to write better zero-shot prompts
- State the task and the exact output you want.
- Define labels or categories precisely.
- Specify format and length (“one word”, “three bullet points”, JSON).
- Say what to do with missing or ambiguous information.
- Add brief context about audience or purpose.
Zero-shot chain-of-thought: adding an instruction such as “think through this step by step” before answering can improve accuracy on reasoning problems. A 2022 study by Takeshi Kojima and colleagues showed this simple phrase substantially improved results on several reasoning benchmarks. See chain-of-thought.
When zero-shot is not enough
Switch to few-shot or add more context when:
- Your categories are custom or subtle, such as internal ticket types.
- You need a specific house style or tone.
- Outputs are inconsistent across runs.
- The task is rare or specialised.
- Results must match a precise template.
Zero-shot in machine learning more broadly
In classical machine learning, “zero-shot learning” means a model recognising categories it never saw during training, often by using descriptions of those categories. Zero-shot prompting is the language-model version of the same idea: doing a task without task-specific examples.
Limitations
- Less reliable on ambiguous, custom or specialised tasks.
- Sensitive to wording; small phrasing changes can shift results.
- The model’s interpretation of labels may differ from yours.
- Without grounding, factual answers can include hallucinations.
