Definition

Few-Shot Prompting

Few-shot prompting includes a small set of input and output examples in the request to show the model a task or format. The examples can illustrate routine, boundary and ambiguous cases. Test results on separate inputs and account for the context required to include each example.

Show a boundary case as well as an obvious one

A ticket router chooses billing, access or needs clarification. Show an unmistakably billing-related message, one about a failed sign-in, and a mixed case that needs a follow-up question. Compare a prompt with those examples against the same instructions alone on a held-out batch. Check per-label errors before adding more examples.

Few-shot prompting and example selection

Intelligence at Scale by Shashank Agarwal

Explained in

Chapter 8: Prompt Engineering and Context Engineering

The number one practical skill for anyone working with AI.

Related terms

This is one term. The chapter is the argument.

Intelligence at Scale: 22 chapters, 65,000 words, 80-plus diagrams. Kindle, paperback and hardcover on Amazon.

Buy on Amazon.com
← All terms