Lv.1 0 XP

Few-Shot Example Design — Teaching Claude By Showing

⚡ Exam Tested 9 min +35 XP
💡
THE ANALOGY

Teaching a new employee by showing examples rather than writing a manual. 'Here's a customer email we handled well. Here's one we handled poorly and why. Now handle this one.' Examples communicate faster and more precisely than instructions for tasks involving judgment.

⚠️ EXAM TRAP — The Wrong Answer People Choose

Using easy, obvious examples in few-shot prompts. The exam tests that few-shot examples should target HARD and AMBIGUOUS cases — the edge cases where judgment is needed — not the obvious cases that Claude would handle correctly without examples.

KEY POINTS
1 Few-shot examples should target hard/ambiguous cases — the places where judgment calls are needed.
2 2-4 examples is the sweet spot — fewer lacks coverage, more risks overfitting to example patterns.
3 Include examples of correct REJECTION — showing what should NOT match is as important as what should.
4 Examples must cover different formats/structures — if all examples are similar, Claude won't generalize.
5 Few-shot beats zero-shot for: extraction tasks, classification with edge cases, format-specific output.