Zero-shot prompts: give a model a clear task without examples
A zero-shot prompt asks a model to perform a task using instructions and input, without showing examples of the task and its desired answers. “No examples” does not mean the model has never encountered the subject during training, or that the prompt cannot include rules, context, or choices. A practical starting point is to state the goal and output requirements clearly, then add examples only if results remain inconsistent.
A zero-shot prompt asks a model to perform a task using instructions and input, without showing examples of the task and its desired answers. “No examples” does not mean the model has never encountered the subject during training, or that the prompt cannot include rules, context, or choices. A practical starting point is to state the goal and output requirements clearly, then add examples only if results remain inconsistent.
What is absent in zero-shot prompting?
Here, a “shot” is a demonstration pair included in the current prompt: an input and its desired answer. Zero-shot prompting provides no such pair and asks the model to do the task from instructions alone. OpenAI’s API documentation presents an instruction without task examples as a simple starting point; for reasoning models, it recommends trying zero-shot first and adding few-shot examples if needed.
This distinction concerns the presence of task demonstrations, not how much information the prompt contains. “Classify the following message as positive, neutral, or negative, and return JSON” can be zero-shot even when it includes the message and label definitions, as long as it gives no input-and-correct-answer example. Conversely, one demonstration is one-shot and several are few-shot.
Zero-shot is therefore not synonymous with an untrained task or with having no prior knowledge. The GPT-3 study distinguished a task description alone from one-shot and few-shot settings that include demonstrations in the prompt, without updating model parameters at evaluation time. Its results concern a particular 2020 model and tasks; they do not prove that every current model performs the same way or that zero-shot is always better.
What should you specify when there are no examples?
Without demonstrations, the model has more room to infer unstated rules. Break the request into parts to reduce that ambiguity.
| Element | Make clear | Example for message classification |
|---|---|---|
| Task | What judgment or transformation to perform | Classify the sentiment of a customer message |
| Input boundary | Which text to analyze | Evaluate only the content inside <message> |
| Label definitions | What each answer means | Positive: satisfaction or praise; negative: complaint or disappointment; neutral: neither is clear |
| Exceptions | What to do when the input is ambiguous or insufficient | Return unclear when confidence is insufficient |
| Output contract | Required fields, values, and length | Return only the specified JSON keys |
| Constraints | What not to infer or do | Do not infer intent or facts absent from the message |
Suppose a customer writes, “Delivery was fast, but the product differed from its description.” If the only instruction is “classify the sentiment,” the model may not know whether to prioritize the positive or negative part. Define the labels and decide how to handle mixed sentiment. For example, you could ask for the label based on the main customer issue, or return both positive and negative scores. These are design options; the right choice depends on the task.
A simple zero-shot structure is:
Task: <what to do>
Input: <material to process>
Criteria: <labels, rules, and exceptions>
Output: <required format and fields>
Constraints: <for example, do not guess>Fill in the structure, mark the input boundaries, and check for missing conditions or ambiguous output. If the format must be strict JSON, consider an API-supported structured-output feature or schema validation. Asking the model for a format and having the application validate it are separate steps.
When should you start zero-shot, and when add examples?
Zero-shot is a useful baseline when the task is familiar, can be described clearly, and you want to check basic behavior first. It keeps the prompt shorter and avoids examples that may conflict with the instructions. Those advantages do not establish output quality; results depend on the model, task, and data.
Clarify the instructions or compare with examples when:
Your team’s labels differ from their everyday meanings.
Natural-language rules do not clearly express output format or decision boundaries.
You need to show a preferred style among several reasonable answers.
Results on representative inputs are wrong or inconsistent.
One demonstration makes the prompt one-shot; several make it few-shot. Examples can show a desired pattern, but poorly chosen ones can introduce bias or conflict with the written rules. OpenAI recommends showing varied possible inputs and keeping demonstrations consistent with the instructions. Prompting advice may also differ between general language models and reasoning models, so do not assume one recipe fits both.
A small comparison exercise
Imagine building a customer-message classifier. Use the same input set and model settings for two versions: A contains only task instructions; B adds an example that clarifies an ambiguous label boundary. Before choosing, check whether each output matches the expected label, whether its format is valid, and whether it handles unclear cases appropriately. Also check whether errors cluster around certain inputs.
This is an illustrative evaluation method, not a report of measured performance or a benchmark. In production, build evaluation data with representative and boundary cases, then reuse it when changing the model version or instructions. An example that helps one case can hurt another, so assess the full set.
How should you fix an unexpected zero-shot result?
First identify the failure instead of adding examples at random:
**The task is vague:** replace broad verbs such as “summarize” with a precise action, such as “extract the main claim.”
**Input boundaries are unclear:** mark the data separately from the instruction.
**Decision criteria are missing:** define labels, priorities, and what to do with uncertainty.
**Outputs vary:** narrow the contract with required keys, allowed values, and item limits.
**External facts are needed:** provide authorized context or a path to say “cannot verify”; do not ask the prompt to invent facts.
If you change several conditions at once, it is hard to tell what helped. Keep representative cases fixed and compare one change at a time. In a real product, natural-language prompting alone cannot guarantee format, safety, or permission. Implement input validation, server-side authorization, output parsing, and business-rule checks in the application.
Takeaway
A zero-shot prompt gives the model a task without demonstrations. Specify the task, input boundary, criteria, exceptions, and output format, then evaluate results on representative cases. If label or style boundaries remain unclear, compare a version with examples and keep the change only if evaluation supports it.
References
[OpenAI API: Reasoning best practices](https://developers.openai.com/api/docs/guides/reasoning-best-practices) — recommends starting reasoning models with simple, zero-shot instructions and adding few-shot examples when useful.
[OpenAI API: Prompt engineering](https://developers.openai.com/api/docs/guides/prompt-engineering) — explains demonstrations and prompt construction.
[Brown et al., Language Models are Few-Shot Learners (2020)](https://arxiv.org/abs/2005.14165) — distinguishes zero-, one-, and few-shot settings and reports task-specific results and limits.