Pattern · intermediate
Reflection and Self-Critique Pattern
Reflection patterns add a critique step so agents can check work, catch errors, and improve outputs before finalizing.
- reflection
- quality
Reflection (self-critique) inserts a review step: generate → critique against criteria → revise.
When to use
- High-stakes writing or analysis
- Coding agents after tests fail
- Any time a cheap verifier exists
Variants
| Variant | How it works |
|---|---|
| Self-reflection | Same agent critiques itself |
| Dual-model | Stronger/cheaper critic model |
| Tool-verified | Tests, schemas, compilers as critics |
| Human critique | HITL review |
Prefer tool-verified reflection when possible—it is less circular than pure LLM self-talk.
Cost warning
Reflection multiplies calls. Gate it:
- Only on low confidence
- Only on high-risk actions
- Only when automated checks fail
Evaluation
Measure lift in success rate vs added cost. Drop reflection if it does not move outcomes.
Frequently asked questions
What is reflection in AI agents?
Reflection is a deliberate critique step where the agent (or a second model) reviews intermediate work against criteria and revises before producing a final result.
Related reading
Plan-and-Execute Pattern
Plan-and-execute agents draft a multi-step plan first, then carry out steps with optional re-planning.
Agent Evaluation: How to Measure Reliability, Cost, and Success
A practical framework for evaluating agentic systems: task success, trajectories, tool correctness, cost, latency, and regression suites.
Building Coding Agents: Architecture and Guardrails
How coding agents work: repo tools, planning, tests as rewards, sandboxes, and evaluation for software engineering agents.