Lesson 2.2

Few-shot examples

Examples communicate format and edge-case handling far better than description. Two well-chosen ones usually beat a paragraph of instructions.

Duration
5m
Level
Intermediate
Students
21k students

Overview

Examples communicate format and edge-case handling far better than description. Two well-chosen ones usually beat a paragraph of instructions.

In this lesson you will:

  • Show the format instead of describing it
  • Choose examples that cover the tricky cases
  • Watch for examples that bias the output

Resources

Claude API documentation

The official reference for the tools used in this lesson.