Reflection and Self-Correction

The first output is rarely the best output — a truth as old as writing, and one that applies to agents too. An agent that acts once and moves on repeats its mistakes; an agent that looks back at what it did, judges whether it worked, and tries again can dramatically improve. Reflection — the agent evaluating and correcting its own work — is what turns a one-shot attempt into an iterative process that gets better, and it's one of the most powerful patterns for making agents reliable on hard tasks.

Reflection and self-correction is the pattern where an agent evaluates its own work and improves based on that evaluation — catching and fixing mistakes rather than accepting the first attempt. This post covers what reflection is, how the reflect-and-revise loop works (the Reflexion idea), why it improves results, and its costs and limits. It’s a key pattern for agent reliability, building on the loop, and it connects closely to the reasoning-models series’ ideas about self-correction and verification.

What reflection is

Reflection (or self-critique/self-correction) is when an agent examines its own output or actions, evaluates them (is this correct? did it work? is it good enough?), and uses that evaluation to improve — revising, retrying, or correcting. The core idea:

Reflection is the agent evaluating its own work and using that evaluation to improve (revise, retry, correct) — formalizing the human “draft, review, revise” dynamic. It replaces accepting the first attempt with an iterative process that catches and fixes mistakes. The concrete mechanism is a reflect-and-revise loop.

The reflect-and-revise loop

Reflection is implemented as a loop: attempt → evaluate → revise → repeat — a pattern crystallized by ideas like Reflexion. How it works:

   Reflect-and-revise loop:
     1. ATTEMPT   — produce output / take action
     2. EVALUATE  — critique it (correct? worked? good enough?)
     3. REVISE    — if not good enough, improve based on the critique
     4. repeat    — until satisfactory (or a limit)

The reflect-and-revise loop (attempt → evaluate → revise → repeat), formalized by Reflexion, is how reflection is implemented — with evaluation from self-critique, tools (tests, checks), or external feedback, driving informed revision, bounded by a limit. This iterative loop is what lets agents refine their work toward quality. And it demonstrably improves results.

Why reflection improves results

Reflection meaningfully improves agent performance on hard tasks — worth understanding why:

Reflection improves results by catching mistakes the first attempt misses, leveraging the verify-vs-generate asymmetry (checking is easier than first-try perfection), spending test-time compute on iterative improvement, and being especially powerful with concrete evaluation (like code tests). It’s a key reliability pattern. But it isn’t free or unlimited.

Costs and limits of reflection

Reflection is powerful but has real costs and limits — knowing them is part of using it well:

Reflection and self-correction — the agent evaluating and improving its own work in a reflect-and-revise loop (Reflexion) — is a powerful pattern that catches mistakes, leverages the verify-vs-generate asymmetry, and improves results via iterative test-time compute, especially with concrete evaluation (like code tests). But it costs compute, self-evaluation can be unreliable (prefer objective checks), and it needs bounds. Next: multi-agent patterns — coordinating multiple agents.

Key takeaways

Further reading

Sources & References