What is zero-shot prompting?

Improve prompts and agents
HoneyHive Engineering

Zero-shot prompting gives a model instructions and no examples, so it relies on what it learned in training to do the task.

Zero-shot prompting means asking a model to do a task with instructions only and no worked examples. The model relies on what it learned in training. Google’s docs define it by contrast: “prompts that provide no examples are called zero-shot prompts”, while prompts with a few examples are few-shot. It is the baseline for every other prompt engineering technique.

Where the term comes from

The GPT-3 paper (Brown et al., May 2020) applied a model “without any gradient updates or fine-tuning”, with tasks specified purely as text. Two later papers made zero-shot a goal of its own:

  • Wei et al. (September 2021) showed that instruction tuning “substantially improves zero-shot performance on unseen tasks”. Their 137B model, FLAN, beat zero-shot 175B GPT-3 on 20 of 25 tasks.
  • Kojima et al. (May 2022) found that adding “Let’s think step by step” before the answer, with no examples, raised MultiArith accuracy from 17.7% to 78.7% on text-davinci-002. They called it Zero-shot-CoT. See chain-of-thought prompting.

What the providers say

Provider Guidance
Google (Gemini) “We recommend to always include few-shot examples” in prompts; prompts without them are “likely to be less effective”
OpenAI For reasoning models: “Try zero shot first, then few shot if needed”. They “often don’t need few-shot examples”
Anthropic Claude responds well to clear, explicit instructions; examples are one of the most reliable ways to steer format, tone and structure

The advice splits by model type. OpenAI says reasoning models do better “on tasks with only high-level guidance”, while GPT models “benefit from more explicit instructions around how to accomplish tasks”. Google recommends examples for Gemini either way.

Making a zero-shot prompt work

With no examples, the instructions carry everything. Anthropic offers a test: show the prompt to a colleague with minimal context on the task and ask them to follow it. “If they’d be confused, Claude will be too.”

  1. State the task, the output format and any constraints in plain words.
  2. Run it on a fixed set of real inputs and read the failures.
  3. Fix unclear instructions first. If the format or tone is still off, add examples; see few-shot prompting for how.
  4. Keep the zero-shot version as a baseline and compare each change on the same cases, as in LLM evaluation.

Testing a zero-shot baseline in HoneyHive

A HoneyHive experiment runs a function on a dataset with evaluate() and scores each output with evaluators. To compare, run one experiment per prompt variant, with and without examples, on the same dataset and compare the aggregated metrics.

Related: system prompts, prompt versioning.

FAQ

What is zero-shot prompting?

A prompt that describes the task and includes no worked examples. Google's docs call these "prompts that provide no examples".

When should I move from zero-shot to few-shot?

When the output format, tone or edge-case handling is wrong after you have clarified the instructions. OpenAI's reasoning guide says to try zero shot first, then few shot if needed. See few-shot prompting.

Is zero-shot chain-of-thought still zero-shot?

Yes. Kojima and colleagues added the phrase "Let's think step by step" with no examples, which raised MultiArith accuracy from 17.7% to 78.7% on text-davinci-002.

Share