/pattern/iterative-refinement/

02 · WorkflowRevise LoopDraft-ImproveProgressive Refinement

Iterative Refinement.
One artifact. Many passes. Each better than the last.

Controlled passes improve a single artifact across revisions, often using explicit feedback from rules, tests, or users.

When to reach for it

  • Result quality increases gradually and intermediate states must be preserved.
  • External feedback is readily available.

When it backfires

  • A valid result is typically generated in one step.
  • Revisions lack clear signals.
  • Consistency drops through repeated rewriting.

The tradeoff

Improved artifact quality is achieved at the expense of longer runtimes and potential thematic drift.

The mental model

A shape you can draw on a napkin.

A drafter produces an artifact; a critic suggests improvements. The loop stops when the artifact passes review.

DrafterCritic
Pitfalls

Two ways this pattern will hurt you.

The critic is too harsh — endless rewriting

The critic raises a new issue on every pass. The drafter never reaches a stable artifact.

Fix · Cap iterations and require the critic to rank issues by severity. Only block on critical findings.

Thematic drift across revisions

Each rewrite shifts tone or emphasis. By pass 5, the artifact no longer matches the original intent.

Fix · Freeze the original brief and diff each revision against it. Reject changes that drift from the brief.

Framework support

Where Iterative Refinement is native.

LangGraphNative
CrewAICrewAI FlowsNative
Microsoft Agent FrameworkNative

Search

Search patterns, frameworks, and pages.