Evaluator-optimizer — write a draft, let a judge critique it, revise — step 7 of 9
This loop has no max_iters ceiling. The judge in this test case is
stubborn — it never says PASS. As written, the while True runs
until the iter pool is empty and Python raises StopIteration
(which in production would mean burning through your API budget).
Fix the loop to bail out after at most 3 iterations, returning the
string "capped" if no PASS was reached.
Expected output:
capped
This loop has no max_iters ceiling. The judge in this test case is
stubborn — it never says PASS. As written, the while True runs
until the iter pool is empty and Python raises StopIteration
(which in production would mean burning through your API budget).
Fix the loop to bail out after at most 3 iterations, returning the
string "capped" if no PASS was reached.
Expected output:
capped
this step needs the editor
on desktop today; in the app (coming soon). save your spot and we'll bring you back here when you're ready.