
What Is Zero-Shot Learning?
Zero-shot learning is a model performing a task it was given no examples of, relying entirely on capabilities absorbed during training. In LLM practice this means prompting with instructions alone: you describe the task, provide no demonstrations, and the model generalizes from what it already knows about language, code, and the world.
Key Takeaways
- Zero-shot means zero examples in the prompt, not zero training. The capability comes from broad pretraining; the prompt only names the task.
- It is the default mode of modern instruction-tuned models. Most everyday LLM usage, from "summarize this" to "write a migration script," is zero-shot.
- Zero-shot is the cheapest prompt to run and maintain, which makes it the right starting point. Add examples only when measured quality demands them.
- Performance depends heavily on how the task is phrased. A precise instruction with explicit output requirements often closes most of the gap to few-shot prompting.
How It Works
The term comes from pre-LLM machine learning, where classifiers were asked to recognize categories absent from their training data, typically by exploiting descriptions or attributes of the unseen classes. A model trained on horses and told "a zebra is a striped horse-like animal" could label zebras without ever seeing one. The underlying idea, generalizing through shared structure rather than direct examples, carried straight into language models at much larger scale. It works in vision too: OpenAI's CLIP matched the ImageNet accuracy of the original ResNet-50 in a zero-shot setting, without touching any of the 1.28 million labeled training examples ResNet-50 was trained on (2021) [1].
A foundation model pretrained on enormous text corpora encounters most tasks implicitly: translation, summarization, classification, and code appear naturally in the data. Instruction tuning then teaches the model to treat a plain description of a task as a request to perform it. That step matters enormously: Google's 2021 FLAN work showed instruction tuning a 137-billion-parameter model lifted its zero-shot performance past zero-shot 175B GPT-3 on 20 of 25 evaluated tasks [2]. The result is that "classify this support ticket as billing, bug, or feature request" works with no demonstrations, because both ticket language and classification behavior are already represented in the weights.
Zero-shot sits at one end of a spectrum. When instruction-only output is unreliable or the format drifts, the next step is few-shot prompting, which adds worked examples to pin down the pattern. Beyond that sits fine-tuning, which moves the pattern into the weights. Practitioners climb that ladder only as far as evals force them, since each rung adds cost and maintenance. A useful nuance for agent builders: tool use by an agent is largely zero-shot, since the model reads a tool description it has never seen and decides how to call it from the description alone. Writing tool specs is zero-shot task design.
Example
A team wants to route inbound sales emails into five intent categories before investing in any ML infrastructure. Their first version is a single zero-shot prompt: the five category names, one line defining each, and an instruction to answer with exactly one category label in JSON. Run against 200 hand-labeled historical emails, it agrees with the human labels roughly nine times out of ten, with most misses concentrated in one ambiguous category pair. That is enough to ship behind a review queue. Only later, when they want the last few points of accuracy, do they add three worked examples targeting the confused pair, moving that one decision from zero-shot to few-shot while everything else stays instruction-only.
What People Get Wrong
The common error is concluding "the model can't do this task" after one failed zero-shot attempt. Zero-shot performance is extremely sensitive to phrasing: naming the output format, defining terms the way you mean them, and stating constraints explicitly can swing results dramatically. The canonical demonstration is Kojima et al.'s 2022 finding that appending "Let's think step by step" to a zero-shot prompt raised text-davinci-002's accuracy on MultiArith from 17.7% to 78.7%, and on GSM8K from 10.4% to 40.7%, with no examples added [3]. Before adding examples or reaching for fine-tuning, iterate on the instruction itself. Many "capability gaps" are specification gaps, and a rewritten prompt closes them for free.
What Is the Difference Between Zero-Shot and Few-Shot?
The prompt contents. Zero-shot provides instructions only; few-shot adds a handful of worked input-output demonstrations for the model to imitate. Zero-shot is cheaper per call and easier to maintain, since there are no examples to curate and keep consistent. Few-shot wins when format precision, unusual conventions, or edge-case handling matter, because demonstrations communicate those things more exactly than prose. Neither updates the model; both are inference-time techniques, and the practical workflow is to start zero-shot, measure, and add shots only where the measurements say to.
FAQ
Is zero-shot learning the same as zero-shot prompting? In current usage, effectively yes. Zero-shot learning is the older, broader ML term; zero-shot prompting names the LLM-era practice of instruction-only prompts. Both describe task performance without task-specific examples.
Does zero-shot mean the model was never trained on the task? Not necessarily, and this trips people up. The model saw no examples in your prompt, but its pretraining data almost certainly contained related material. Zero-shot describes what you provided at inference time, not what the training corpus contained.
When is zero-shot good enough for production? When measured accuracy on a representative eval set meets your bar, and failures are cheap or caught downstream. Plenty of production classification, extraction, and drafting runs zero-shot behind validation and human review. The eval, not the technique, is what tells you it is safe.
Sources
- Radford et al., OpenAI. "CLIP matching ResNet-50 ImageNet accuracy zero-shot." https://arxiv.org/abs/2103.00020. Accessed August 2026.
- Wei et al., Google. "FLAN instruction tuning surpassing zero-shot GPT-3 on 20 of 25 tasks." https://arxiv.org/abs/2109.01652. Accessed August 2026.
- Kojima et al. "Zero-shot chain-of-thought accuracy gains on MultiArith and GSM8K." https://arxiv.org/abs/2205.11916. Accessed August 2026.
Related terms
Related Topics
Ready to build your product?

