Skip to content
AI Engineer Guide.

concept · concepts · intermediate · concept 9 of 37

Reflection

0 of 37 complete

Why it matters

Models make errors they can detect when asked to check: a missing field, an inconsistent total, a violated constraint. But a model asked whether its answer is good, with no external signal, tends to agree with itself. Reflection is therefore a mechanism for applying a check, and its value depends entirely on whether the check has something to stand on.

Mental model

Reflection is a proofreader with a checklist, not a second author with an opinion. The metaphor breaks because a proofreader marks against a style guide, while a checklist invented by the same model that wrote the text tends to confirm the draft.

How it works

Check first, critique only against pinned criteria, then stopInteractive

Keyed transitions

  1. Critique → Validate: recheck
  2. Critique → Criteria drift: critique ⊄ pinned criteria
transitionfailurerepeat

Event · step 1 of 9

Draft

Entry: a first answer and a criteria file with four checkable statements. Reflection starts only because the criteria exist before the draft is judged; a critique written after the fact can always find something.

In state

  • Draft

Next: Validate

Rounds
0
Checks run
0
Pinned
4
Step 1/9 · Draft

Figure. Eight states. Validate runs the deterministic checks before any critique, and Critique may only cite a criterion that was pinned before the draft. Accepted is the only terminal that claims the output passed; Plateau, Criteria drift and Rounds cap are the three ways revision ends without that claim.

What to notice. Three rounds, four criteria and the two failing fields are illustrative. Regression on a correct answer is not a state: it is measured by grading the original and the revision blind, which is a comparison rather than a transition. The critique's grounding is the only thing that separates reflection from a second opinion.

Text version

A state machine with eight states. Draft is the start, a pill. Draft goes to Validate, a hexagonal decision, on criteria pinned. Validate goes to Accepted, a terminal pill, when all checks pass, and to Revise on named failures. Revise goes to Critique. Critique has a repeat edge back to Validate labelled recheck, a normal edge to Accepted labelled criteria met, a red dashed failure edge to Plateau labelled no change, a keyed red dashed edge to Criteria drift, and a red dashed edge to Rounds cap labelled rounds equals three. The trace walks Draft, Validate, Revise, Critique, Validate, Accepted, then Plateau, then Criteria drift, then Rounds cap. Counters show rounds rising to 3, checks run to 3, and pinned criteria at 4 until the drift step shows 5.

  1. Write the criteria as checkable statements: required fields, allowed values, citations that must resolve.
  2. Run deterministic checks first and pass only the failures into the reflection prompt.
  3. Ask for a critique that names the criterion violated and its location, not a general verdict.
  4. Revise once per critique round and keep the previous version for comparison.
  5. Stop after a fixed number of rounds or when the checks pass.
  6. Compare reflected and unreflected outputs on a labelled set before enabling it by default.

Trade-offs

ChoiceGood forCostFails when
Deterministic validatorsCheap, reliable, explainableOnly covers rules you can encodeQuality is about tone or argument
Self-critique without evidenceNo extra toolingConfirms errors and adds costCorrectness matters more than style
Critique with retrieved evidenceGrounded, catches factual slipsRetrieval cost and new failure modesEvidence is unavailable or ambiguous
Multiple revision roundsImproves hard casesCost grows, gains plateauThe latency budget is tight
Trade-off mapInteractive

Good for

Cheap, reliable, explainable

Cost

Only covers rules you can encode

Fails when

Quality is about tone or argument

  1. Quality is about tone or argument
  2. Correctness matters more than style
  3. Evidence is unavailable or ambiguous
  4. The latency budget is tight

Figure. Each choice with what it buys, what it costs, and the case where it loses.

What to notice. The fourth column is the decision: if the losing case describes your situation, the choice is wrong.

Text version

Four trade-offs: Deterministic validators is good for Cheap, reliable, explainable, costs Only covers rules you can encode, and fails when Quality is about tone or argument. Self-critique without evidence is good for No extra tooling, costs Confirms errors and adds cost, and fails when Correctness matters more than style. Critique with retrieved evidence is good for Grounded, catches factual slips, costs Retrieval cost and new failure modes, and fails when Evidence is unavailable or ambiguous. Multiple revision rounds is good for Improves hard cases, costs Cost grows, gains plateau, and fails when The latency budget is tight

Failure modes

  • Self-congratulatory loop. Each round restates the answer with cosmetic edits. Debug: diff consecutive versions and stop when the change falls below a threshold.
  • Criteria drift. The critique invents new requirements and the revision overfits them. Debug: pin the criteria in the prompt and assert the revision cites only those.
  • Regression on correct answers. A good output is revised into a worse one. Debug: run reflected and original outputs through the same grader and compare.

In production

Track revision rate, acceptance rate after revision and cost per task with and without reflection. Disable it for task classes where it does not improve the grader score.

Common misconceptions

People think: Asking the model to check its work doubles reliability.

Actually: Without an external signal the second pass often agrees with the first and adds cost.

People think: Reflection is the same as evaluation.

Actually: Evaluation judges a run to support a decision; reflection is an in-run revision step that consumes budget.

Interview angle

Strong answers ask what the critique is grounded in, then describe the criteria, the number of rounds and the measured effect on a labelled set. Weak answers propose a critique prompt and assume a second pass is strictly better.

Sources