liveBook · Manning

Zero-shot prompting

As explained in Prompt Engineering in Practice

Zero-shot prompting is a prompting technique that asks a model to perform a task without providing task examples in the prompt.

Zero-shot prompting gives a model task instructions without examples, relying on its pretraining. It is a flexible, low-token baseline for tasks that align with the model’s training distribution. section 7.2

Start with zero-shot prompting when:

  • The task is familiar and the model’s training data is likely to cover it. section 7.2
  • You want to avoid the token cost of including examples. section 7.2
  • You need a baseline to evaluate before adding examples. section 7.2

Check whether outputs are consistent enough and fit the task’s domain. If proprietary categories, organization-specific conventions, or specialized knowledge lead to inconsistent results, add few-shot examples to address the gap. section 7.2

Common zero-shot tasks

Standard summarization, straightforward sentiment analysis, common format conversions, and general knowledge questions can work reliably without examples. section 7.2

Figure 7.2 Zero-shot to few-shot decision path. Start with zero-shot prompting, evaluate consistency and domain fit, then add few-shot examples when outputs require stronger format control, domain-specific labeling, or edge case handling.

Use the decision path to start with zero-shot prompting, check consistency and domain fit, and add examples when stronger format control, domain-specific labels, or edge-case handling is needed. section 7.2

How Prompt Engineering in Practice covers it

How deep it goes
Defines instruction-only prompting and its trade-offs, then outlines when examples may help.
Examples
Uses summarization, sentiment analysis, format conversion, general knowledge, and engineering classification tasks.
What you can do after
Evaluate zero-shot consistency and domain fit, then decide whether examples are worth their token cost.
How it connects
Contrasts zero-shot prompting with few-shot prompting and relates both to in-context learning and fine-tuning.

Also explained in

Compare how 9 books explain zero-shot prompting →

Related concepts

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