Reflection

Reflection is asking the model to review its own work before it ships. It helps more than people expect and less than the papers suggest, and everything depends on whether the critic has fixed criteria or is free to say looks good.

How it works

  1. The agent produces a first attempt.
  2. A critic pass evaluates it against written criteria, not against taste.
  3. Failures come back as a specific list, not as a vibe.
  4. The agent revises once, addressing only the listed failures.
  5. If the criteria still fail, it stops and hands the work to a person rather than looping.

Optional: load a real model

See it work

When it pays, and when it does not

Use it whenSkip it when
The output has criteria you can write downYou cannot say what good looks like, in which case reflection just adds cost
A second pass is cheaper than a human reviewThe task is trivial and the first attempt is nearly always right
You can constrain the critic to a checklistThe critic is the same prompt as the writer, which mostly produces agreement
One revision round is enoughYou are tempted by five rounds, which drift rather than improve

How it fails

Self-congratulation

A critic with no criteria says the draft is strong and adds nothing. Fixed criteria or no reflection.

Drift across rounds

Each revision moves further from the source facts. Cap at one round and re-check facts after it.

Cost doubling for nothing

Reflection doubles or triples token cost. Measure whether the second pass changes outcomes before keeping it.

What it costs

LatencyAt least two model calls instead of one, often three.
TokensTwo to three times a single pass, which is the main reason to check that it earns its place.
ComplexityOne more failure point, and one more place where a prompt change silently alters behaviour.
Deterministic critics beat model critics. Where you can express a criterion as code, do, and save the model for the rewrite.

Related: Multiple agents · Verification · Testing agents · all patterns · agent jobs

Free from AI School - no signup, everything runs in your browser.