Zero-Shot Learning (AI Glossary)

Asking an AI to do a task it has never been explicitly shown how to do

Ad placeholder (leaderboard)

Definition

Zero-shot learning is when you ask an AI model to perform a task using only an instruction — with no worked examples included in the prompt. The model must rely on knowledge absorbed during pre-training and instruction tuning to generalise to a task it was never explicitly shown how to do. For example, “Classify this review as positive or negative” with no example classifications is a zero-shot request.

Zero-shot prompting vs few-shot

The term shows up most often as zero-shot prompting, one end of a spectrum:

  • Zero-shot — instruction only, no examples.
  • One-shot — instruction plus a single example.
  • Few-shot — instruction plus several examples.

Adding examples (few-shot) generally lifts accuracy on harder or unusual tasks because it shows the model the exact format and style you want. Zero-shot is cheaper, faster, and uses fewer tokens, so it is the right default for common, well-understood tasks.

Why modern LLMs are good at it

The reason today’s models handle zero-shot tasks so well is instruction tuning. After broad pre-training on internet-scale text, models are fine-tuned on large collections of instruction–response pairs. This teaches them to interpret a plain-language request and map it onto patterns they already know, even for task phrasings they have never seen. Reinforcement learning from human feedback (RLHF) sharpens this further.

When zero-shot falls short

Zero-shot prompting tends to struggle when a task needs a precise output format, niche domain knowledge, or careful multi-step reasoning. In those situations, two cheap fixes usually help: add a few examples to make it few-shot, or append a chain-of-thought cue such as “think step by step”. If neither is enough, fine-tuning on task-specific data becomes the next option.

Why it matters

Zero-shot capability is a large part of what makes LLMs feel general-purpose: you can describe almost any task in words and get a usable attempt without collecting training data or curating examples. Knowing when zero-shot is sufficient — and when to escalate to few-shot or fine-tuning — is a core prompt engineering skill.

Ad placeholder (rectangle)