liveBook · Manning

Zero-shot prompting

As explained in Building Reliable AI Systems

Zero-shot prompting is instructing a model to perform a task without providing task-specific examples in the prompt.

Zero-shot prompting gives a model an instruction without task-specific example demonstrations; it may still include context. It tests whether the model can perform the task using what it learned during pretraining and post-training alignment. section 2.7.1

Sentiment and customer support

An instruction to classify “The film had poor acting and a dull plot” can produce “Negative.” By contrast, a customer asking about a wrong item may receive generic return advice if the prompt lacks the company’s return policy context. section 2.7.1

Zero-shot prompting can struggle with complex tasks and produce inconsistent results. Add examples when instructions alone fail, provide relevant context for customer-service queries, and test prompts on the target model; wording, formatting, and parameters may need adjustment across models or versions. section 2.7.1

How Building Reliable AI Systems covers it

How deep it goes
Defines the technique and demonstrates sentiment classification, then notes failures on complex tasks without detailing implementation.
Examples
Contrasts a sentiment classification prompt with customer support advice that lacks return policy context.
What you can do after
Apply it by giving a task instruction without demonstrations, adding context when needed, and testing on the target model.
How it connects
Connects to few-shot learning, prompt engineering, instruction tuning, and reinforcement learning from human feedback.

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