Zero-shot prompting is a technique where a large language model is asked to perform a task using only a natural-language instruction, with no worked examples or demonstrations included in the prompt. The model relies entirely on knowledge acquired during pretraining.
What Is Zero-Shot Prompting?
Zero-shot prompting is the practice of asking a large language model (LLM) to complete a task using nothing more than a natural-language instruction. The prompt contains no labeled examples and no demonstrations of correct input-output pairs. The model must rely entirely on the general knowledge and task patterns it absorbed during pretraining, plus any behavior instilled by later instruction tuning.
The term 'zero-shot' refers to the number of examples (or 'shots') provided in the prompt: zero. A request such as 'Classify the sentiment of this review as positive or negative: The food was cold and the service slow.' is a canonical zero-shot prompt. The model is told what to do but is never shown a single solved example.
Zero-shot prompting is the simplest and most common way people interact with modern chat assistants. Most everyday questions posed to a model are zero-shot by default, because the user states a goal in plain language and expects an answer without supplying training cases.
- No examples in the prompt, only an instruction and the input.
- No gradient updates or weight changes; the model is used as-is.
- Performance depends on pretraining coverage and instruction tuning.
In-Context Learning: Zero-Shot vs One-Shot vs Few-Shot
Zero-shot prompting sits at one end of a spectrum called in-context learning, a term popularized by the GPT-3 paper, 'Language Models are Few-Shot Learners' (Brown et al., 2020). In-context learning is the ability of a model to adapt to a task at inference time using only information placed in the prompt, without any update to its parameters.
The spectrum is defined by how many demonstrations the prompt includes. Moving from zero-shot to one-shot to few-shot generally trades a longer prompt for more reliable formatting and higher accuracy, especially on tasks where the desired output structure is hard to convey in words alone.
- Zero-shot: instruction only, no examples.
- One-shot: exactly one solved example precedes the real input.
- Few-shot: typically two to five (sometimes more) examples are provided to establish the pattern.
- All three are forms of in-context learning and require no fine-tuning.
How Pretraining Enables Zero-Shot Performance
Zero-shot capability emerges from large-scale self-supervised pretraining. By predicting the next token across enormous text corpora, a model implicitly encounters countless tasks expressed in natural language: translations, summaries, question-answer pairs, classifications, and code. It learns the statistical structure of these tasks without ever being explicitly trained to perform any single one of them.
The GPT-3 paper showed that this ability scales with model size. Zero-shot performance improves steadily as parameter count grows, while few-shot performance tends to improve more rapidly, indicating that larger models are better at exploiting in-context examples. Even with zero examples, a sufficiently large pretrained model can follow many instructions because the instruction itself resembles patterns seen during pretraining.
One useful reframing from later research is that in-context examples may serve less to teach a model a new skill and more to help it locate a skill it already learned during pretraining. Under this view, a zero-shot prompt that clearly names and frames the task can sometimes match few-shot prompting, because the capability already exists and only needs to be triggered.
Zero-Shot Chain-of-Thought: The 'Let's Think Step by Step' Trick
A landmark result for zero-shot reasoning came from Kojima et al. (2022), 'Large Language Models are Zero-Shot Reasoners,' published at NeurIPS 2022. The authors found that simply appending the phrase 'Let's think step by step' to a prompt elicits multi-step reasoning without any worked examples. They called the method Zero-shot-CoT (zero-shot chain-of-thought).
The effect on arithmetic and symbolic reasoning benchmarks was large. Using the InstructGPT model (text-davinci-002), Zero-shot-CoT raised accuracy on the MultiArith benchmark from 17.7% to 78.7% and on GSM8K from 10.4% to 40.7%, compared to standard zero-shot prompting. This demonstrated that reasoning ability is partly latent in pretrained models and can be elicited by a single generic cue rather than hand-crafted demonstrations.
Zero-shot-CoT is valuable precisely because it preserves the simplicity of zero-shot prompting while recovering much of the accuracy gain normally associated with few-shot chain-of-thought. It requires no example curation and generalizes across many reasoning task types.
When Zero-Shot Works and When It Fails
Zero-shot prompting works best on common, well-represented tasks where the instruction is unambiguous and the output format is simple. Sentiment classification, summarization, translation between high-resource languages, and general question answering are typically handled well with no examples.
- Works well: common tasks, clear instructions, simple or free-form outputs, capabilities well covered by pretraining.
- Struggles: highly specific output formats (strict JSON schemas, custom label sets), niche or proprietary domains, and tasks where the instruction alone underspecifies the desired behavior.
- Struggles: multi-step reasoning without an elicitation cue, though Zero-shot-CoT often mitigates this.
- Common failure modes: incorrect formatting, misinterpreting an ambiguous label, or confidently producing wrong answers (hallucination) on knowledge outside the model's training.
Zero-Shot vs Few-Shot vs Fine-Tuning: Choosing an Approach
Zero-shot, few-shot, and fine-tuning form an escalating ladder of effort and cost. Zero-shot and few-shot are both prompting strategies that change nothing about the model weights. Fine-tuning, by contrast, updates the model's parameters on task-specific data and is a training process, not a prompting one.
A practical strategy is to start at the cheapest rung and climb only when accuracy demands it. Begin with zero-shot; if formatting or accuracy is insufficient, add a few examples (few-shot); if the task is high-volume, highly specialized, or requires consistent behavior that prompting cannot reliably produce, consider fine-tuning.
- Zero-shot: lowest cost, shortest prompt, fastest to iterate; best first attempt.
- Few-shot: moderate prompt length and token cost; improves format adherence and edge-case handling.
- Fine-tuning: highest upfront cost; alters weights, can reduce per-request prompt length, and suits stable, repetitive, domain-specific tasks at scale.
Practical Tips for Reliable Zero-Shot Prompts
Because a zero-shot prompt has no examples to anchor behavior, the quality of the instruction carries the full weight of the request. Small wording changes can meaningfully shift output quality and consistency.
- State the task explicitly and name the desired output format (for example, 'Respond with only one word: positive or negative').
- Constrain the answer space when classifying, by listing the exact allowed labels.
- Add 'Let's think step by step' (Zero-shot-CoT) for arithmetic, logic, or multi-step problems.
- Provide relevant context or source text in the prompt rather than assuming the model knows niche facts.
- Assign a clear role or audience when tone matters (for example, 'Explain for a beginner').
Relationship to Modern Instruction-Tuned and Reasoning Models
The reliability of zero-shot prompting improved with instruction tuning. The FLAN work, 'Finetuned Language Models Are Zero-Shot Learners' (Wei et al., 2021), showed that fine-tuning a model on many tasks phrased as natural-language instructions substantially raises zero-shot performance on unseen tasks. In that study, the instruction-tuned 137B-parameter FLAN model surpassed zero-shot 175B GPT-3 on 20 of 25 evaluated datasets.
This insight underlies today's chat assistants, which are pretrained and then instruction-tuned (often with reinforcement learning from human feedback) so that following a plain instruction is their default mode. As a result, zero-shot prompting is now the normal way most users interact with models, and it succeeds far more often than it did with raw, non-instruction-tuned base models. More recent reasoning-focused models extend this further by performing extended internal reasoning, which reduces the need for an explicit 'think step by step' cue on many problems.
In applied systems such as AI memory tools, where a user stores documents and notes and later retrieves them by asking in plain language, zero-shot prompting is what lets the system interpret an unfamiliar query without the user supplying examples.
Key takeaways
- Zero-shot prompting asks a model to perform a task from a natural-language instruction alone, with no examples and no weight changes.
- It is one end of the in-context learning spectrum, contrasting with one-shot and few-shot prompting, which add demonstrations to the prompt.
- Zero-shot capability comes from large-scale pretraining and is strengthened by instruction tuning, as shown by the FLAN research.
- Zero-shot chain-of-thought ('Let's think step by step') sharply improves reasoning accuracy without any examples, per Kojima et al. (2022).
- Start with zero-shot for its low cost and speed; escalate to few-shot or fine-tuning only when accuracy or formatting requires it.
Frequently asked questions
Related terms
Related reading
Sources
Put the idea into practice
MemX is an AI memory agent built on these ideas: store anything, skip the folders, and find it again by asking in plain English.
Try MemX Free