Reflection
Description
An agent evaluates its own output and revises based on that self-critique. The generator and evaluator collapse into one actor playing two roles — first producer, then critic, then producer again. The structural shape is same-agent + two-roles + revise-on-self-feedback, distinct from external-critique loops (evaluator-optimizer with separate evaluator) because the same agent’s blind spots constrain what the self-assessment can catch. The diagnostic question — “can this agent notice its own failure modes from inside?” — is what makes reflection load-bearing or not. Reflection works for failure modes the agent can recognize (typos, arithmetic, structural inconsistency, missing context); it fails for blind-spot failure modes (the same biases that produced the error infect the self-critique). The concept is most powerful when paired with structured criteria — explicit checklist, framework, or distinct-prompting that puts the same agent in a deliberately-different cognitive mode.Triggers
User-initiated: User asks for self-checking, sanity-checking, “did I get this right?” Vocabulary cues: “reflection,” “self-critique,” “review your work,” “sanity check,” “second pass,” “Reflexion.” Agent-initiated: Agent notices that its own output is at risk of catchable errors (typos, structural inconsistencies, missing constraints) and that an explicit re-pass would catch them. Candidate inference: “reflect against [explicit criteria]; flag anything that doesn’t pass.” Situation-shape signals: Multi-step plans before execution. Output that’s about to be sent to a downstream consumer. Long-running generations where consistency matters. Tasks with structured success criteria the agent can self-check against.Exclusions
- Blind-spot failure modes — when the agent’s biases produce both the error and the failed self-critique, reflection alone can’t catch it; external critique is required.
- Trivial outputs — over-applying reflection to outputs where the iteration adds no value produces “reflection theater” that slows work without improving quality.
- Time-bounded settings where iteration is impossible — real-time control, fast-response systems; the reflection loop’s cost exceeds its benefit.
- No criterion to reflect against — reflection without explicit standards becomes “feels right” — the same intuition that produced the output, applied twice.
Structure
Relationships
- evaluator-optimizer — reflection IS evaluator-optimizer in the same-agent case; the structural shape is identical, the failure modes differ.
- feedback-loop — reflection is feedback-loop with the agent as both source and recipient; deliberately constructive (unlike hoist-by-own-petard).
- doctrine — reflection’s effectiveness depends on having a doctrine for what to reflect against (explicit criteria, checklist, framework).
- chain-of-thought — chain-of-thought exposes reasoning; reflection then evaluates the exposed reasoning. The two compose into “think → reflect on thinking → revise.”
- trigger-rule-pair — reflection’s trigger condition is “you just produced output,” the rule is “now critique it against criterion X.”
Examples
Code self-review before submitting a PR · computer-science
Code self-review before submitting a PR · computer-science
Surgical checklists (Atul Gawande) · medicine-and-health
Surgical checklists (Atul Gawande) · medicine-and-health
Anthropic engineering blog, "Building Effective Agents" (2024) — reflection pattern. · computer-science
Anthropic engineering blog, "Building Effective Agents" (2024) — reflection pattern. · computer-science
reflection concept treats this engineering pattern and the broader cognitive-science notion of metacognition as instances of the same structural shape.Anthropic's reflection pattern in agent design · computer-science
Anthropic's reflection pattern in agent design · computer-science
Flavell (1979), "Metacognition and cognitive monitoring" — psychological foundations. · psychology
Flavell (1979), "Metacognition and cognitive monitoring" — psychological foundations. · psychology
Gawande (2009), *The Checklist Manifesto* — reflection institutionalized into procedure. · medicine-and-health
Gawande (2009), *The Checklist Manifesto* — reflection institutionalized into procedure. · medicine-and-health
Mathematicians sanity-checking proofs · mathematics
Mathematicians sanity-checking proofs · mathematics
Pre-commit hooks · computer-science
Pre-commit hooks · computer-science
Reflexion (Shinn et al. 2023) · computer-science
Reflexion (Shinn et al. 2023) · computer-science
Donald A. Schön, *The Reflective Practitioner: How Professionals Think in Action* (Basic Books, 1983). · education
Donald A. Schön, *The Reflective Practitioner: How Professionals Think in Action* (Basic Books, 1983). · education
Shinn et al. (2023), "Reflexion: Language Agents with Verbal Reinforcement Learning" — https://arxiv.org/abs/2303.11366; Schön (1983), *The Reflective Practitioner* — earlier conceptual treatment distinguishing reflection-in-action from reflection-on-action. · computer-science
Shinn et al. (2023), "Reflexion: Language Agents with Verbal Reinforcement Learning" — https://arxiv.org/abs/2303.11366; Schön (1983), *The Reflective Practitioner* — earlier conceptual treatment distinguishing reflection-in-action from reflection-on-action. · computer-science
evaluator-optimizer pattern with a different evaluator), not more rounds of self-reflection.