Iterative Refinement (Agent)
First drafts are cheap and usually wrong in small ways. Iterative refinement is the habit of not shipping the first draft: the agent produces an attempt, examines it against what was actually asked, fixes what it finds, and goes round again.
The cycle
Each pass has three parts: generate an output, evaluate it, then revise with the evaluation sitting in context beside the original goal. Everything depends on where the evaluation comes from:
- A self-critique prompt asks the model to find its own faults — cheap, and limited by what the model can notice about itself.
- A judge model or rubric scores the draft against stated criteria, which keeps the feedback consistent across passes.
- A grounded signal — a failing test, a compiler error, a schema validation — is strongest, because the verdict comes from outside the model.
Where it stops paying
Gains concentrate in the first two or three passes and then flatten; past that the agent pays full generation cost to move commas. With no external signal it converges on confident sameness, or oscillates — undoing in pass four what it fixed in pass three. Bounded pass counts and a stop condition that is not the model's own opinion are therefore standard. Self-Refine and Reflexion are the reference formulations, and a coding agent runs the grounded version every time it reruns a test suite after an edit.
Why it matters
A single model call commits to one attempt. Refinement lets an agent trade tokens for quality on work it has already done — the difference between an output that is nearly right and one that passes.
Iterative refinement is the practice of having an agent improve its own output across repeated passes: generate a draft, evaluate it against the goal or an external check, then revise with that feedback in context. It converts one uncertain attempt into a progressively better one, and it is most reliable when the evaluation comes from a grounded signal — a failing test, a validation error — rather than the model's own opinion of its work.
Nobody writes a good letter in one go. You write it, read it back, notice the clumsy sentence, fix it, read it again. Iterative refinement is software doing that with its own work.
Instead of handing over its first attempt, the program checks it — against the instructions it was given, or against something harder to argue with, like whether the code it just wrote actually runs. Then it makes another pass.
Two or three rounds help a lot. After that it mostly fiddles, which is why these systems are given a firm limit on how many times they are allowed to go round.