Zero-Shot Learning
Zero-shot learning means asking a model to do a task with only an instruction and no examples, relying on what it learned during training.
Machine Learning
Key takeaways
- Zero-shot uses only an instruction, with no examples.
- It works because pretraining covered the underlying concepts.
- It is the cheapest prompt, so try it before reaching for few-shot.
- With no examples to disambiguate, the wording of the instruction carries everything.
Zero-shot learning means asking a model to do something using only an instruction, with no examples at all. It relies entirely on what the model already learned.
That this works is the surprising part. A model never trained to classify your specific categories can often do it from a clear description, because the underlying concepts were in its training data.
Think of it like this. Think of asking a well-read colleague to sort documents into categories they have never sorted before. No training needed, because they already understand what the categories mean.
How it works
- Instruction only. Describe the task in plain language.
- The model draws on pretraining, where it saw enough related material to generalise.
- Clarity carries all the weight. With no examples to disambiguate, the wording is everything.
- Cheapest option, since no example tokens are sent.
When to use it
- Common, well-understood tasks: summarise, translate, classify sentiment.
- When output format is simple or does not matter much.
- When token cost matters, since it is the cheapest possible prompt.
- Try it first. If zero-shot works, few-shot is wasted money.
Common mistakes
- "Zero-shot means the model is guessing." It is applying knowledge from pretraining. On familiar tasks it is often as good as few-shot.
- "It should work for anything." Unusual formats and domain-specific conventions need examples. That is exactly what few-shot is for.
- "A vague instruction is fine." With nothing to imitate, ambiguity in your wording goes straight into the output.