AI Pattern · Quality
Reflection Pattern
The model critiques its own output, then improves it.
Reflection runs the model over its own work. It generates a first answer, is then prompted to critique that answer against explicit criteria, and finally revises based on the critique, optionally looping until the result is good enough. The same model plays author and editor.
How it works
- 1Generate an initial answer
- 2Critique it, what is wrong, missing, or weak?
- 3Revise the answer to fix the critique
- 4Optionally repeat until it passes
Strengths
- Catches mistakes the first pass misses
- Noticeably better code, writing, and reasoning
- Simple to add, no extra tools required
Watch-outs
- Two to three times the tokens, latency, and cost
- Can over-edit and second-guess a good answer
- The critic shares the author’s blind spots
When to use it
Complex outputs where a second pass clearly helps, drafting code, long-form writing, multi-step reasoning. Skip it for simple lookups where the first answer is already reliable.
Example prompt
Here is your draft answer: <draft> Critique it: list specific errors, gaps, and weaknesses. Then write an improved version that fixes each one.