Yeda AI Tips · #191

Español

Cap Adversarial Review at Three Cycles

Stop letting your AI review itself forever.

Adversarial self-review, where an agent critiques its own output and then revises, is a genuinely good technique. It catches blind spots a single pass misses. But an open-ended loop has no natural stopping point, so it keeps running long after the returns have gone flat, re-surfacing the same findings and burning tokens while you mistake motion for progress.

Why an uncapped loop stalls

Each review cycle has diminishing returns. The first pass finds the structural problems. The second finds the edge cases the fix introduced. By the third, you are mostly down to stylistic nits and re-litigated opinions. Without a cap, the agent has no criterion to say "done," so it either loops until you interrupt it or declares victory arbitrarily. Endless review feels rigorous but is really just deferring the decision to ship.

The mechanism: three cycles, with early exits

Set a hard ceiling and two early-stop conditions.

Adversarial review loop:
  cycle = 1
  while cycle <= 3:
      findings = review(artifact)          # find what's wrong
      if only_trivial(findings): break     # early exit 1
      if human_says("ship it"): break      # early exit 2
      artifact = revise(artifact, findings)
      cycle += 1

What surviving findings mean

If real issues are still standing after three rounds, that is not a signal to loop a fourth time. It is information about the artifact itself: the problem is harder or more ambiguous than a review loop can resolve. Do one of two things.

SituationResponse
Trivial nits remainStop and ship
A hard issue survives three roundsEscalate to a human or a stronger model
The artifact keeps failing broadlyDecompose it into smaller pieces and review each

Looping again just re-runs the same limited process against the same hard problem.

Power moves

Resources

Shipping AI or cloud systems? Yeda AI audits and hardens production LLM and container pipelines. Talk to us · Read the blog