AI Glossary / Prompting and human-AI interaction / Beginner
Zero-shot prompting
Definition
Zero-shot prompting asks a model to perform a task without including a completed example of that task in the prompt. The request can still contain detailed instructions, definitions, source material and output requirements. Zero-shot refers to the absence of demonstrations, not to the absence of prior model training.
What it means
A user can ask, "Summarise this notice in two sentences", then supply the notice. If no completed summary is shown as an example, this is a zero-shot prompting setup.
The model relies on capabilities learned before the request and on the information supplied in the current context. It does not need to be retrained for every instruction, but that does not guarantee a correct response.
The distinction is useful when comparing prompting strategies. Adding one completed input-output example produces a one-shot setup; adding several produces a few-shot setup in the common terminology. A long prompt can still be zero-shot, and a short prompt can include a demonstration.
How it works
State the task, provide the relevant input and specify any essential constraints. These might include which facts to use, the intended audience, the required response structure and what to do when information is missing.
The model generates a response conditioned on that context. For extraction, the prompt might identify the fields to return. For explanation, it might identify the reader's level. For classification, it might define the allowed labels without supplying labeled examples.
Evaluate the result against the task requirements rather than assuming that fluent text indicates success. If performance is weak, determine whether the issue is ambiguous instructions, missing evidence or a capability limitation. Demonstrations may help some tasks, but they are one possible intervention, not an automatic solution.
Three practical examples
- A team asks a model to extract dates from a supplied announcement and return them in their original wording, without showing a completed extraction.
- A student asks for an explanation of a familiar concept for a beginner, specifying a maximum length but providing no example explanation.
- An editor asks for a supplied paragraph to be rewritten in a neutral tone while preserving its factual claims, without supplying a model rewrite.
Think of it this way
Think of giving someone a clear assignment without a worked sample. The instructions may be detailed, and the person may already know how to perform similar tasks.
This helps separate two questions: whether an example was provided now, and whether the recipient has relevant prior experience. Zero-shot prompting answers the first question, not the second.
Worked example
Consider an original print-planning request: "We need 73 name labels. Each sheet contains 12 usable labels. We can print only whole sheets. Calculate the minimum number of sheets and the unused labels. Return two labelled lines. Use only these quantities."
No completed printing example appears in the request, so it is zero-shot prompting. The quantities are the input to solve, not demonstrations.
The intended calculation is 73/12, approximately 6.0833, rounded upward to seven sheets. Seven sheets provide 84 labels, leaving 84 - 73 = 11 unused labels. Six sheets provide only 72 and therefore fall short.
The required output could be:
Sheets: 7
Unused labels: 11
Now suppose the application tests this prompt on twenty independent planning cases. Fourteen responses have both quantities correct and the required two-line structure. Three have correct quantities but the wrong structure, two have the right structure but wrong quantities, and one fails both.
Numerical correctness is 17/20 = 85%; structural compliance is 16/20 = 80%; success on both is 14/20 = 70%. Separate scores reveal different failures.
The invented counts are not actual model results. A deterministic calculation may be more appropriate for this fixed arithmetic task, while the example illustrates how a zero-shot request can be specified and checked.
Illustrative case study
Fictional case: Cedar Community Centre wants short summaries of event announcements. Its initial zero-shot prompt asks for the event, location and date, and requires the model to mark missing details rather than guess.
The team tests notices with rescheduled dates, several locations and incomplete information. Reviewers compare each summary with the source, scoring unsupported additions separately from length and style.
The team then compares a version with one demonstration against the original on held-out notices. It retains the simpler version only if its measured results meet the intended requirements. This fictional case claims no measured savings.
Common misconceptions and mistakes
- Zero-shot means a prompt contains no context: source documents and detailed instructions are allowed.
- A label definition is automatically a demonstration: a demonstration shows a completed task example, not merely the meaning of a label.
- Zero-shot proves the task was absent from pretraining: training exposure is a separate issue.
- One request always means zero-shot: the request may contain several demonstrations.
- A zero-shot prompt changes the model's weights: ordinary inference uses the existing model parameters.
Business use
Zero-shot prompting is a useful baseline for tasks that a model may already handle with clear instructions. It can be easier to maintain than a prompt containing many examples and avoids spending context on demonstrations that do not improve results.
Still, the real decision is whether the workflow is accurate and economical enough for its purpose. Evaluate difficult and incomplete inputs, record the model and prompt version, and compare alternatives on the same cases. If output structure is essential, validate it explicitly. If facts must come from a supplied document, inspect grounding rather than relying on the prompt's wording alone.
People also ask
Can a zero-shot prompt request a particular role?
Yes. A role instruction is not itself a worked demonstration. Its effect should be evaluated separately.
Can it ask for intermediate steps?
Yes. The absence of examples does not prevent requesting a structured solution. Such a request does not guarantee that the steps are correct.
Is zero-shot always cheaper than few-shot?
It often uses fewer input tokens for the same task, but total cost also depends on response length, retries, tools and model pricing.
Check your understanding
A prompt contains a source paragraph, three category definitions and no labeled examples. Is it necessarily few-shot because it mentions three categories?
Answer: No. Category definitions are not completed demonstrations. The setup can still be zero-shot prompting.
Related terms
- Zero-shot
- One-shot prompting
- Few-shot prompting
- Prompt engineering
- Evaluation
- instruction following
- context
- demonstration
- output validation
Learn next
Choose one repeated task and define its success criteria. Write a zero-shot prompt with clear input and output boundaries. Evaluate it on varied held-out cases, then compare a demonstration-based version while keeping the model, test cases and scoring rules fixed.
More in Prompting and human-AI interaction
- Role prompting - Role prompting asks a generative AI model to respond from a specified role or persona, such as a patient tutor, editor or interviewer.
- Soft prompt tuning - Soft prompt tuning adapts a pretrained model by learning a small set of continuous prompt vectors while keeping the base model's weights fixed.
- System prompt - A system prompt is an application-level instruction supplied to a language model to establish its role, task, behavior or response conventions.
- Tree-of-thought prompting - Tree-of-thought prompting organizes language-model problem solving as a search over alternative intermediate steps.
- Zero-shot learning - Zero-shot learning is a learning setting in which a model recognizes target classes without labeled training examples of those classes, using transferable...
- Zero-shot TTS - Zero-shot TTS is text-to-speech synthesis that generates speech for a target speaker without separately fine-tuning the synthesis model on that speaker.
Sources
Google Machine Learning Crash Course, prompt engineering and zero-shot examples: https://developers.google.com/machine-learning/crash-course/llm/tuning
Google Machine Learning Glossary, zero-shot prompting: https://developers.google.com/machine-learning/glossary
Brown and colleagues, Language Models are Few-Shot Learners, 2020: https://arxiv.org/abs/2005.14165
The label-sheet calculation, evaluation counts and Cedar Community Centre case are original hypothetical illustrations.
Previous: Zero-shot learning Next: Zero-shot TTS