The framing that the retry loop, not Lambda duration, drives cost lands hard, since a worker-evaluator that bounces back five times quietly multiplies token spend per request. I now log the attempt count per invocation as a first-class metric, because a rising average predicts a bad prompt long before the bill does. Do you cap retries by count alone, or on an evaluator confidence delta too?
Count alone right now: turn_count hits 5 and it exits. No confidence delta, because the evaluator returns a boolean, not a score, so there’s nothing to take a delta on. That’s the real gap. Converging-on-turn-5 and stuck-in-a-loop both hit the cap and cost the same. Next step is a numeric score so I can stop on a stalled delta and kill the stuck runs early. And I’m stealing the attempt-count metric.
Kartik N V J K
AI Developer | Making AI reliable, trustworthy & accessible to everyone | Active community contributor
The framing that the retry loop, not Lambda duration, drives cost lands hard, since a worker-evaluator that bounces back five times quietly multiplies token spend per request. I now log the attempt count per invocation as a first-class metric, because a rising average predicts a bad prompt long before the bill does. Do you cap retries by count alone, or on an evaluator confidence delta too?