Zero-shot prompting

From llmref.wiki
Zero-shot prompting — Asking a language model to perform a task with instructions alone and no worked examples, relying on generalization from pre-training.

Overview

Zero-shot prompting is a prompting approach in which the model is given a task description — possibly with a format specification — but no worked examples of how to perform it. The model must generalize from its pre-training to carry out the task without in-context demonstration.

Zero-shot prompting is the default interaction mode for most language model applications: the user or developer writes instructions, and the model performs the task without needing to supply examples. Its viability depends on how well the task is represented in the model's pre-training distribution and on the clarity of the instructions.

The concept was formalized relative to few-shot prompting (In-context learning) in the GPT-3 paper, which documented the degradation in performance on many tasks when examples were removed from the prompt.

Zero-shot CoT

A notable variant is zero-shot chain-of-thought (Kojima et al., 2022): appending the phrase "Let's think step by step" (or a functional equivalent) to the prompt. This simple addition causes many models to generate intermediate reasoning steps before the final answer, substantially improving accuracy on reasoning tasks without requiring any examples.[1]

Zero-shot CoT demonstrates that structured behavior can be elicited through instruction alone, extending the utility of zero-shot prompting to tasks that previously required few-shot examples.

When zero-shot prompting is appropriate

Scenario Zero-shot appropriate? Notes
Task is well-represented in common training data Yes Translation, summarization, Q&A on common topics
Complex domain-specific task Less reliable Few-shot or fine-tuning may be needed
Exact output format required Partially Format specs in system prompt help; examples help more
Limited tokens available for prompt Yes No overhead from examples

Distinction from related terms

  • Zero-shot prompting is a degenerate case of In-context learning with zero examples — the boundary is definitional, not architectural.
  • Chain-of-thought prompting adds explicit reasoning steps; zero-shot CoT combines both.
  • System prompt instructions are zero-shot by definition (they describe behavior, not demonstrate it).

See also

References

  1. Kojima, Takeshi et al. "Large Language Models are Zero-Shot Reasoners." NeurIPS 2022. https://arxiv.org/abs/2205.11916