Looking at its own work
Reflection is a step where the agent treats its draft answer as input and critiques it. Instead of returning the first attempt, it asks what is wrong and tries to fix it.
The reflect loop
- Draft: produce an initial answer or plan.
- Critique: list specific flaws, gaps, or errors in that draft.
- Revise: rewrite the draft to address each flaw.
- Repeat until the critique finds nothing major or a step cap is hit.
The critique pass often uses a different prompt framing than the drafting pass, which surfaces issues the first pass missed.
Why it helps
- Catches arithmetic and logic slips before the user sees them.
- Forces the agent to justify claims, exposing weak ones.
- Improves code by spotting unhandled cases.
The limits
- Reflection costs extra model calls and time.
- A model can be confidently wrong in both the draft and the critique.
- Endless self critique wastes budget, so cap the rounds.
Reflection works best when paired with real feedback, such as running the code, rather than the model judging itself in a vacuum.
Key idea
Reflection has an agent critique and revise its own draft in a loop, catching errors before the user sees them, but it costs extra calls and is strongest when grounded in real feedback rather than self judgment alone.