liveBook · Manning

Zero-shot prompting

As explained in Effective Conversational AI

A zero-shot prompt is a prompt that specifies a task without providing an example of the desired input-output behavior.

When an LLM produces the wrong kind of training utterance, adding examples may help—but a zero-shot prompt deliberately starts with instructions only. It specifies the task without showing an example of the desired input-output behavior. section 7.2.2 section 7.2.4

Generate login utterances without examples

A zero-shot request might ask an LLM to generate ten varied customer utterances for people who cannot log in, using nouns and verbs related to passwords and accounts. The output can include “I can’t log in,” “My password isn’t working,” and “My account is locked.” To demand fragments instead, add the instruction “Use sentence fragments only”; this remains zero-shot because no example fragment is supplied.

Use zero-shot prompting as a quick first pass, then evaluate its usefulness:

  • Generate examples for an intent such as store location, varying nouns, verbs, and grammatical structures. section 7.2.4
  • Compare the time and variety of zero-shot output with manually written examples and one-shot or few-shot prompts. section 7.2.4
  • Add useful utterances to training or test data only after checking whether they improve classification accuracy and do not worsen balance. section 7.2.4

How Effective Conversational AI covers it

How deep it goes
Defines the zero-shot, one-shot, and few-shot distinction and demonstrates generation, but defers model internals.
Examples
Uses login utterances, sentence fragments, store-location intents, grammatical structures, and password-reset examples.
What you can do after
Apply it via generative AI to create candidate intent examples, compare prompting strategies, and measure changes in classification accuracy.
How it connects
Connects zero-shot prompting with one-shot learning, few-shot prompting, intent classification, training data, test sets, and templates.

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 Effective Conversational AI. The section links point to the parts of the book it draws on.