C3 · Reflection

Family: Single agent

The agent critiques its own output, or draws a lesson from a failure, then tries again.

Principle

The agent rereads its output, critiques it and rewrites it (Self-Refine). In the Reflexion variant, after a failure signalled by the environment, it writes a lesson it keeps in memory before trying again. The pattern is only worth it when a reliable failure signal exists.

The problem it solves

A first attempt can often be improved, but without feedback you do not know what to fix.

When to use it

  • A reliable failure signal exists: tests, compilation, schema validation.
  • You want a quick win that is easy to implement before considering a heavier architecture.

When to avoid it

  • No external signal is available: self-critique can reinforce a mistake. Prefer a separate, equipped evaluator (B5).
  • A plain retry would give a similar result for less: compare against sampling and voting first (B4).

Common pitfalls

The anti-patterns that misuse this pattern, best established first. Each sheet describes the symptoms, the public incidents and the remedies.

Context and memory

Verification and evaluation

Oversight, operations and governance

All anti-patterns

Synonyms by vendor

  • Reflection (A. Ng, A. Gulli (ch. 4))
  • Self-Refine (Madaan et al. (NeurIPS 2023))
  • Reflexion (Shinn et al. (NeurIPS 2023))
  • Self-reflection (CSIRO Data61)

Neighbouring patterns

Sources

Content reviewed on 2026-10-02

Pattern catalogue