Zero-shot prompting means asking a model to do a task from an instruction alone, without showing it any examples of the answer you want. "Translate this paragraph into Spanish" and "Summarize this email in two sentences" are zero-shot prompts. It is the default way people use chat models, and for common tasks it is usually all you need.
What zero-shot means
In machine learning, a "shot" is a worked example. The terms are older than chat models, but their prompting sense was popularized by Brown et al. 2020, "Language Models are Few-Shot Learners", which tested GPT-3 in three settings: a task description with zero, one or a few demonstrations in the prompt, and no retraining in any of them. For that model, a few examples usually beat none.
Since then, chat models have been trained heavily on following instructions, which is why a plain request now works so well. A zero-shot prompt is exactly the situation they were trained for: someone describes a job in words and expects it done.
Zero-shot does not mean zero context. A good zero-shot prompt still states the audience, pastes the input, and describes the format and the limits. The only thing it leaves out is a finished example of the output.
A zero-shot prompt, done well
The prompt below extracts action items from meeting notes with no example of the output, only a precise description of it. Switch parts off to see which lines do the work.
Sprint sync, Tuesday
Priya will fix the login timeout before Friday.
Talked about moving to a new CI provider, no decision.
Tom to write the release notes for 2.4.
Someone should update the onboarding doc.
Lena: I'll review Tom's notes by Thursday.Priya: Fix the login timeout (before Friday) Tom: Write the release notes for 2.4 Unassigned: Update the onboarding doc Lena: Review Tom's release notes (by Thursday)
The format line does the job an example would: it spells out the exact shape of each line, so there is nothing to copy. Switch it off and the reply picks its own shape, often a bulleted list with bold names, which reads fine but no longer pastes cleanly into a tracker. Switch the constraints off and the CI discussion may appear as a task, because nothing told the model that undecided topics do not count.
When zero-shot is enough
Zero-shot works when the model can infer everything from your words:
- The task is common. Summarizing, translating, explaining, fixing grammar and writing a function to a clear spec are all tasks the model has seen countless times in training.
- You can describe the output exactly. "One line per item, owner first" is as clear as an example. See structured output for describing formats a program will read.
- The categories mean what they say. Sorting reviews into positive and negative usually needs no examples, because those labels mean the same thing to nearly everyone.
When to add examples instead
Some things are hard to put into words, and those are where zero-shot prompts start to miss:
- Your own boundaries. If your support team files "can't log in" under account problems rather than bugs, the model cannot know that. It will pick the reading most people would.
- A house style. Your team's commit messages or the tone of your newsletter are easier to show than to describe.
- Repeated near misses. If you have reworded the instruction twice and the output is still slightly off in the same way, stop rewording and show two or three correct answers.
That is few-shot prompting. A sensible habit is to start zero-shot, look at what comes back, and add examples only for the specific thing it gets wrong.
Zero-shot chain of thought
Kojima et al. 2022, "Large Language Models are Zero-Shot Reasoners", found that adding one sentence, "Let's think step by step", made large models noticeably better at arithmetic, symbolic and logic problems, with no examples at all. The phrase makes the model write out intermediate steps before the answer, and each step it writes becomes context for the next. Their method used two calls: the first produced the reasoning, and the second asked for the final answer.
In the block below, the first tab forces an immediate answer and the second gives the model room to work.
12:40
The first reply dropped the 10 minutes the train made up: the kind of slip that happens when a model must commit to the answer in its first few tokens. A current model may well get this one right either way; the difference grows with the number of steps in the problem. The second version has one more advantage: every step is visible, so you can see where an answer went wrong.
Models that reason internally before they answer already do this work without being asked, so "Let's think step by step" adds little for them beyond a longer reply. Chain of thought prompting covers the technique in depth, including the few-shot version.
Zero-shot versus few-shot at a glance
| Zero-shot | Few-shot | |
|---|---|---|
| What the prompt contains | Instructions, context and input | The same, plus a few input and answer pairs |
| Best for | Common tasks with an easy-to-describe output | Custom labels, unusual formats, house style |
| Cost | Short prompt | Longer prompt, more tokens per call |
| Typical failure | Picks the most common interpretation, not yours | Copies accidental patterns in the examples |
Frequently Asked Questions
What is zero-shot prompting?
Zero-shot prompting is giving a language model a task with instructions only, and no worked examples of the output. "Summarize this email in two sentences" is a zero-shot prompt. Modern chat models are trained to follow instructions, so zero-shot prompts handle most everyday tasks well.
What is the difference between zero-shot and few-shot prompting?
A zero-shot prompt describes the task in words. A few-shot prompt adds a few examples, each an input paired with the answer you want, so the model can copy the pattern. Start zero-shot; switch to few-shot when the output keeps missing a format or a distinction that is easier to show than to describe.
Why is it called zero-shot?
In machine learning a "shot" is a worked example. Brown et al.'s 2020 GPT-3 paper, "Language Models are Few-Shot Learners", tested the model with zero, one or a few demonstrations of a task in the prompt, and that made the names standard for prompting: zero-shot, one-shot and few-shot.
When does zero-shot prompting not work?
It struggles when the task depends on rules only you know, such as your team's categories or house style, when the output format is unusual, and on multi-step reasoning where the model answers too fast. Examples fix the first two; asking the model to work step by step helps with the third.
What is zero-shot chain of thought?
It is a zero-shot prompt that asks the model to reason before answering, most famously by adding "Let's think step by step." Kojima et al. showed in 2022 that this one sentence, with no examples, improved large models' results on arithmetic and logic problems.