Agents
Reflection & self-correction
Critique your own output and try again — works best with an external signal.
What it is and why it exists
The model reviews its work (or a separate evaluator does) and revises. It is most effective with grounded feedback — failing tests, validation errors, a checklist — and much weaker when the model just asks itself “are you sure?”.
Quick prototype
Second call: “Review the answer above and fix any errors.”
In production, at scale
Evaluator-optimizer loops with concrete criteria, external verifiers (tests, schema validation, retrieval checks), a max iteration count and a stop when the score stops improving.
Vendors and tools
| Reflexion paper | Verbal self-reflection for agents |
|---|---|
| Coding agents | Run tests, read failures, fix |
How it fails
- Self-critique that rubber-stamps or flip-flops
- Unbounded revise loops
What the interviewer asks next
Why do coding agents self-correct well?
They get an external, objective signal — compiler errors and test results — instead of judging themselves.