Zero-shot prompting means asking the model to perform a task with no examples — just an instruction. Modern instruction-tuned LLMs are often surprisingly capable zero-shot, since instruction tuning specifically trains them to follow direct instructions.
Example
Prompt:
"Classify the sentiment of this review as positive, negative,
or neutral: 'The delivery was fast but the product quality was
disappointing.'"
Expected output: "Negative" (or a nuanced "Mixed, leaning negative"
depending on how the instruction is worded)
No examples were given — just a clear instruction and the input. This is zero-shot: relying entirely on the instruction's clarity and the model's pretrained/instruction-tuned knowledge.
When Zero-Shot Works Well
- Common, well-understood tasks (sentiment classification, summarization, translation) the model has seen extensively during training
- Tasks where the instruction alone is genuinely unambiguous
- Quick prototyping, before investing in examples or fine-tuning
When Zero-Shot Falls Short
Zero-shot (ambiguous output format):
"Extract the key entities from this text: [text]"
→ Output format is unpredictable — might be a list, a paragraph,
inconsistent labeling across different runs
Few-shot (shown format via examples) usually performs more
consistently for this kind of structured-output task — see
Few-Shot Prompting.
Zero-shot struggles most with tasks requiring a very specific, consistent output format, or genuinely novel/unusual task framings the model hasn't seen much of during training.
Practical Use Case
Start with zero-shot as the default for a new prompt — it's the cheapest (fewest tokens) and simplest to test. Move to few-shot only if zero-shot output is inconsistent or doesn't match your needed format, rather than adding examples preemptively.
Common Mistakes
- Immediately reaching for few-shot examples without first testing whether a clear zero-shot instruction is sufficient — adds unnecessary token cost if not needed
- Blaming the model for inconsistent zero-shot output when the actual issue is an ambiguous instruction that could be tightened instead
Interview Relevance
"When would you choose zero-shot over few-shot prompting?" — cost efficiency and simplicity for well-understood tasks, moving to few-shot specifically when output consistency/format becomes an issue.
Practice Question
Write a zero-shot prompt to classify support tickets into "billing," "technical," or "general" categories, being as unambiguous as possible without using examples.