Skip to main content
BVDNET
Arnhem · websites & automationBVDNET
Practical Applications

Zero-shot prompting

Zero-shot prompting means giving an AI model a task with just an instruction and no examples; it is the quickest place to start, and examples can follow if needed.

Also known as: zero-shot, zero-shot learning

Zero-shot prompting means asking an AI model to do a task with only an instruction and no examples. "Sort this customer email into complaint, question or order" is a zero-shot prompt: the model works out what you want from the instruction alone. It is the quickest start: there are no examples to collect, and a shorter prompt costs less. If the answers miss the mark, add a few examples.

Where does the term come from?

It comes from machine learning. In zero-shot learning a model has to recognise classes it never saw in training, such as a zebra described as a striped horse. For language models the GPT-3 paper by Brown et al. (OpenAI, 2020) defined three settings: zero-shot means the model gets only a description of the task in plain language, one-shot adds one example and few-shot several. The ability behind all three is in-context learning.

The authors called zero-shot the most convenient setting and also the most challenging one. Without an example even a person can misread a task such as "make a table of world records for the 200m dash": which columns, which records? On the TriviaQA quiz questions GPT-3 scored 64.3% zero-shot and 71.2% few-shot, and across 42 benchmarks zero-shot improved steadily with model size while few-shot improved faster.

Why do models follow a bare instruction?

One reason is instruction tuning: training a model on many tasks that are written as instructions. Wei et al. (Google, 2021) did this with a model of 137 billion parameters and over 60 tasks. The result, FLAN, beat zero-shot GPT-3 on 20 of 25 tasks it had not been trained on. The gain depended on size: for models of 8 billion parameters and smaller, instruction tuning made results on new tasks worse.

How do you get more out of it?

  • Be precise about the task, the labels and the format of the answer (see prompt).
  • For multi-step problems, ask for the reasoning. Kojima et al. (2022) added "Let's think step by step" and raised the accuracy of OpenAI's text-davinci-002 on the MultiArith sums from 17.7% to 78.7% and on GSM8K from 10.4% to 40.7%, without examples (chain of thought).
  • With reasoning models that step is built in. In September 2026 OpenAI advises trying zero-shot first with those models, and says an instruction to "think step by step" may not help and can sometimes hinder. The makers of DeepSeek-R1 (January 2025) found that few-shot prompting consistently made their model worse, and recommend describing the problem and the output format zero-shot.

Where does it go wrong?

  • The task is ambiguous. Without examples the model guesses the format, the length and where the borderline cases go. Examples or a fixed format (structured output) remove that guesswork.
  • Neither approach always wins. On GPT-3, Reynolds and McDonell (2021) found that well-written zero-shot prompts could clearly beat few-shot ones; in their view the examples mainly help the model find a task it already knows.
  • Results differ per model, even between versions of one model, OpenAI notes. Test the prompt on real cases whenever the model changes.

Example

The same email task as under few-shot prompting, now without examples:

Plain Text
1Label the customer email below as complaint, question or order.
2Answer with one word.
3
4Email: The invoice shows the wrong address, can you fix that?

The model answers with one of the three labels. Whether it calls this email a question or a complaint is exactly the kind of doubt that one sentence with your own rule, or a few examples, settles.