liveBook · Manning

Zero-shot prompting

As explained in Understanding AI

Zero-shot prompting is prompting a model to perform a task from a task description without providing task-specific examples.

Zero-shot prompting asks a language model to perform a task using only a description of what to do, without showing task-specific examples. It is the simplest prompting approach and often works well for everyday requests. section 3.2.2

A zero-shot request

Asking a model to summarize a document without providing a sample summary is zero-shot prompting. The model receives the task, but must infer the expected response from the instruction alone. section 3.2.2

Use zero-shot prompting as the starting point:

  • Describe the task clearly and specify the desired response when the output is straightforward. section 3.2.2
  • Switch to one-shot or few-shot prompting when the format, classification rules, style, or consistency are difficult to describe. section 3.2.2
  • Treat the result as information to evaluate, because clear prompting does not remove hallucinations, overconfidence, bias, or other model limitations. section 3.5
Figure 3.4 Three common prompting approaches. In zero-shot prompting, the model receives only a task. In one-shot prompting, a single example is provided. In few-shot prompting, multiple examples are provided to establish a clearer pattern.

Compare zero-shot prompting with one-shot and few-shot prompting by the number of examples supplied to the model. section 3.2.2

How Understanding AI covers it

How deep it goes
Defines the technique, contrasts it with one-shot and few-shot prompting, and stops short of implementation internals.
Examples
Uses question answering, content writing, document summarization, and classification contrasts to illustrate prompting choices.
What you can do after
Apply it by starting with a task description, then add examples when results are inconsistent or underspecified.
How it connects
Connects zero-shot prompting with prompt engineering, one-shot prompting, few-shot prompting, and language models.

Also explained in

Compare how 12 books explain zero-shot prompting →

Related concepts

This explainer was generated by Manning's knowledge graph from the text of Understanding AI. The section links point to the parts of the book it draws on.