Zero-Shot Learning
Asking an LLM to perform a task using only instructions, with no input-output examples in the prompt. Relies entirely on the model's pretrained knowledge.
What Is Zero-Shot Learning
Zero-shot learning is the default way most people talk to an LLM: you describe what you want, and the model does it without seeing any examples. No demonstrations, no labeled samples — just an instruction. The capability emerges from instruction tuning and RLHF, where models are trained to follow descriptions of arbitrary tasks. Use it for everything by default, then fall back to few-shot only if the output isn’t good enough.
How It Works
You write a clear instruction in natural language. The model maps the instruction to patterns learned during training and produces output. Modern instruction-tuned models — GPT-4o, Claude Sonnet 4.5, Gemini 2.5, Llama 3.1 Instruct — handle most everyday tasks well in zero-shot mode.
Example zero-shot prompt:
Classify this customer email as one of: refund, shipping, account, other.
Email: "Hi, I never got my package. Order #4421."
No examples. No demonstrations. Just instruction and input.
When Zero-Shot Works
- Common tasks the model has seen many times in training (summarize, translate, classify, rewrite)
- Tasks with clear natural-language descriptions
- Frontier models on standard NLP benchmarks
When It Fails
- Niche output formats (custom JSON schemas, internal DSLs)
- Domain-specific vocabulary the model hasn’t memorized
- Tasks where “good” is subjective and hard to describe
Zero-Shot vs Few-Shot vs Fine-Tuning
Zero-shot is the cheapest path — minimal tokens, fastest iteration. Few-shot adds examples when instructions alone don’t lock the model in. Fine-tuning is the last resort: expensive, slower to change, but produces the most consistent results at scale. Always benchmark zero-shot first before reaching for the heavier tools.