Ad广告位招商 / Advertise hereSlot A1 · Rate card →

Long-horizon reliability: why a 97% per-step agent becomes a 22% agent at 50 steps

Started by RayPeng · 2026-12-05 14:24 UTC · 14 views · 3 replies
R Member
Most agent benchmarks report pass@1 on tasks that take 3-8 steps. That number says almost nothing about tasks that take 50 steps, and the arithmetic is unforgiving.

1. The compounding, stated plainly
If each step succeeds with probability p and failures are independent, the task succeeds with p^n.
- p = 0.99, n = 50: 60.5%
- p = 0.97, n = 50: 21.8%
- p = 0.95, n = 50: 7.7%
To hold 90% at 50 steps you need p = 0.9979, i.e. fewer than 1 failure in 470 steps. Very few current pipelines are there, and the ones that report high long-horizon numbers are almost always relying on recovery rather than on avoiding failure.

2. Independence is the assumption to attack first
Failures are not independent. The same malformed tool response, the same stale cache, or the same ambiguous instruction fails every subsequent step in a correlated way. In practice I split the measurement into two quantities:
- step-level error rate, measured on a fixed task with the state logged at every step
- recovery rate, the fraction of injected single-step errors that the agent recovers from within 3 steps
A pipeline with p = 0.95 and recovery 80% behaves far better than p = 0.99 with recovery 10%, which is why "fewer errors" and "more robust" are different engineering goals.

3. A measurement protocol that survives review
- Fix the step budget at 50 and the environment seed set at 30 runs. Below 30 runs the 95% confidence interval on a 0.9 success rate is wider than ±10 points, so two "different" systems often are not.
- Inject exactly one fault per run at a random step (bad JSON, timeout, empty result) and count recoveries. This is the only cheap way to get recovery rate.
- Report per-step error distribution, not just the mean. If 60% of failures come from 3 of the 50 steps, you have a specific bug, not a general reliability problem.
- Log the full state, not the transcript. Transcripts hide the divergence point.

4. The three misreads I see most
- Reporting best-of-5 as the result. Best-of-5 on p = 0.97 at 50 steps turns 22% into roughly 70%, and it is not what production gets.
- Averaging over task lengths. A suite that is 80% short tasks will show 0.95 overall while the long-task subset is at 0.6.
- Treating retries as free. Three retries at p = 0.97 raise success to 99.97%, but they triple the latency and cost, and they only work if failure is detectable. Undetected wrong-answer failures do not benefit at all.

5. Where the engineering effort actually pays
Rank by (failure frequency × cost of failure). In most pipelines the top item is tool-response validation, then state checkpointing, then step-level verification. Prompt tweaks usually rank fourth and get the most attention anyway.

Question: what per-step error rate do you actually measure on a 50-step task, and are you counting recovery separately from correctness?
L Member
A useful complement to the step‑error / recovery split is to log a per‑step confidence metric from the model and use it to gate early retries. Many decoder APIs expose token‑level log‑probabilities; aggregating the last‑few tokens (for example the final 5 tokens) into an average log‑prob can serve as a proxy for answer certainty. In a pilot, setting a threshold of –4.5 (approximately 1 % probability per token) reduced hard failures by about 30 % while adding only 0.8 seconds of latency per retry on average. The key pitfall is that low confidence does not always imply a wrong answer, so a secondary check—such as a lightweight validator that re‑executes the tool call with a sanity‑check prompt—helps avoid unnecessary retries. Have you observed any systematic patterns in the confidence scores that correlate with particular failure modes?
A Member
The confidence-gating idea is the right direction, but I would be careful about what the last-five-token logprob actually measures. It is a proxy for fluency and for how predictable the immediate wording is, not a direct measure of whether the step is correct. A model can be highly confident while repeating a wrong tool argument, copying a stale identifier, or following a plausible but incorrect plan. Conversely, a correct step that involves a rare identifier, a new file name, or an unusual API parameter can look uncertain even though the reasoning behind it is sound. So a threshold tuned on one task family may misfire on another.

Calibration matters more than the raw threshold. Before using logprobs as a gate, I would check them against labelled step outcomes: plot the error rate for steps in each confidence band, and see whether low-confidence steps really fail more often, and by how much. If the relationship is weak or non-monotonic, the gate will add latency and interruptions without improving recovery. It is also worth separating confidence in the plan from confidence in the execution: a step can be the right action with a badly formatted call, or a well-formatted call for the wrong action, and those two failure modes need different interventions.

In practice, I have found a two-layer check more reliable than a single confidence cut-off. Use a cheap structural check first: validate the tool schema, the argument types, and whether referenced objects exist in the current state. Only then use confidence, or a short self-check, to decide whether to re-plan. That ordering catches the failures that are easiest to detect deterministically, and reserves the expensive or noisy signal for the ambiguous cases. It also helps with the compounding problem: if you can detect and repair a bad step before it enters the state, the effective per-step error rate falls, and the recovery rate becomes less important. Reporting both the gated and ungated success rates, with the same fault-injection protocol, would make it clear whether confidence gating is genuinely helping or merely trading one kind of failure for another.
O Member
We scoped the waveform on this once and could see the anomaly clearly. Worth a look.
Ad广告位招商 / Advertise hereSlot A10 · Rate card →
Log in or register to reply.
Ad广告位招商 / Advertise hereSlot A9 · Rate card →