All concepts
Agent Reflection
Have the agent critique its own output or trajectory before finalizing.
Agentic AI · Advanced · ~8 min
In plain English
Before handing in the work, read it back and ask 'does this actually answer the question?' — then fix what's wrong.
Why it's worth your time
One review pass catches a surprising share of errors, and it's the cheapest quality mechanism an agent has.
If you remember three things
- A separate pass with a critic's instructions, not the author's
- Concrete criteria beat 'is this good?'
- One or two rounds; more converges to nothing
Overview
A self-correction loop where an agent critiques its own draft answer or tool trajectory before finalizing. A separate critic pass flags errors, missing evidence, and policy issues; the agent revises, then optionally verifies with tests or citations. Trades latency for reliability.
How it works
- Start: Draft Answer The agent produces an initial answer or tool trajectory.
- Draft Answer -> Critic Pass A separate prompt/model checks correctness, missing evidence, and policy issues.
- Critic Pass -> Revision The agent edits the plan or answer based on critique.
- Revision -> Verification Optional tests, citations, or tool checks validate the revision.
- Verification -> Final Answer Reflection improves reliability but adds latency and can overthink simple tasks.
In an interview
Reflection means the agent reviews its own output before returning it: produce a draft, run a critic prompt that checks correctness and missing evidence, revise, and optionally verify with tools or tests. It raises reliability on hard reasoning and coding tasks, but adds latency and can overthink trivial ones.
Production defaults
- Rounds
- 1, sometimes 2. Beyond that it edits without improving
- Criteria
- explicit checklist tied to the task, not a general quality question
- Cheaper option
- a deterministic check (does it compile, does it validate, does it cite) beats a reflection call every time
What breaks
- Reflection always says it's fine — Same model, same context, same blind spots. Give the critic explicit failure criteria and a different framing.
- Each round makes it worse — Over-editing. Stop after one round unless a concrete check is still failing.