0Pricing
Claude Architect · Lesson

Generalization vs Repetition

The model applies the pattern to new cases.

The Core Idea

Few-shot prompting means putting a handful of worked examples directly in the prompt. But here is the key insight architects must internalize:

The model does not memorize and replay your examples. It generalizes the underlying pattern and applies it to brand-new inputs it has never seen.

Good examples are teachers, not a lookup table. This single distinction drives every design choice in this lesson.

Repetition vs Generalization

Imagine you give Claude two examples that classify support tickets as billing or technical.

  • Repetition (the wrong mental model): the model only handles inputs nearly identical to your examples.
  • Generalization (what actually happens): the model infers the rule behind the labels and classifies a totally new ticket correctly.

Your job is to write examples that make the rule obvious, not to cover every possible input.

All lessons in this course

  1. Why 2-4 Examples Work
  2. Examples for Format & Edge Cases
  3. Generalization vs Repetition
  4. Few-Shot to Reduce Hallucination
← Back to Claude Architect