One Green Eval Run Is an Anecdote. Measure Agent Flakiness

Most agent teams treat a green eval run as evidence the agent works. On a system that samples its answers, one run is one draw from a distribution, and a case that fails 30% of the time passes a single run 70% of the time. The number worth watching is how often each case flips between runs, and it's the cheapest quality signal you aren't collecting yet.
By Daniel Usvyat · Principal, USQRD
Do the Arithmetic on What One Green Run Proves
Take a case where the agent succeeds 70% of the time. Run it once and seven times in ten you'll see green, and green is what gets shipped. That's a 30% failure rate. The dashboard called it a pass.
Repeat runs help less than people expect. If a case passes five out of five, the exact 95% upper bound on its true failure rate is about 45%. At ten clean runs it's about 26%. At twenty, about 14%. Zero failures in a small sample is weak evidence, and most suites run each case exactly once.
The suite level is worse. Give a suite 50 cases, each 98% reliable, and a full run comes back all-green only about 36% of the time. Teams respond by rerunning until it goes green. That habit is selection bias with a CI badge on it: you keep the draw you liked and throw away the ones that told you something.
Rerunning a red suite until it goes green is selection bias with a CI badge on it.
Temperature Zero Won't Make Your Agent Deterministic
The usual objection is that we set temperature to 0, so runs are reproducible. That's wrong, and Thinking Machines showed it in 2025: they sent the same prompt to Qwen3-235B a thousand times at temperature 0 and got 80 distinct completions. The cause is mundane. Inference servers batch requests together, batch size changes the order of floating-point reductions, and floating-point addition isn't associative. A tiny numeric difference flips one token, and every token after it follows a different path.
An agent amplifies this. A one-token difference in turn two can change which tool gets called in turn three, which changes what gets retrieved, which changes everything downstream. A chat answer that drifts by a word is usually fine. An agent that drifts from look_up_order to cancel_order isn't.
Vendor-hosted models add another layer you don't control: silent model updates, routing across hardware, provider-side batching. Assume non-determinism and measure it. Trying to engineer it away at the sampling layer is a dead end for anything running on someone else's GPUs.
Run Every Case k Times and Sort the Results
Sierra's τ-bench paper (Yao et al., 2024) put a name on this. Alongside pass@1 it reports pass^k, the probability that an agent succeeds on all k independent attempts at the same task, and their GPT-4o function-calling agent shows why that matters: around 61% on the retail domain at pass^1, below 25% at pass^8. Same agent. Same tasks. That gap is the flakiness, and pass@1 hides all of it.
The practical version is simple. Run each case k times, with k between 5 and 10 to start. Then put every case in one of three buckets:
Stable-pass and stable-fail are both useful. A stable fail is a known capability gap: put it on the roadmap or scope it out. The flaky bucket is where the agent ships with a coin flip inside it, and it's the bucket a single green run is structurally unable to see. Report the bucket counts next to the headline pass rate. A 90% pass rate with 2 flaky cases is a different agent from a 90% pass rate with 15.
- →Stable-pass: k out of k green. Treat as working, but only up to the confidence bound above.
- →Stable-fail: 0 out of k. A real gap, deterministic enough to debug like normal code.
- →Flaky: anything in between. This is the first list to work through.
Flaky Cases Point at Ambiguity You Can Fix
A case that passes 6 out of 10 is telling you the agent sits on a decision boundary. Something in its inputs supports two readings, and sampling noise picks one. That's good news. Ambiguity is usually fixable in a way raw capability isn't. A model that can't do the task fails every time. If it gets there six times out of ten, it can clearly do the job, and something in how you've set it up is splitting its vote between two answers it can both justify.
When I look at a flaky case, I diff the passing traces against the failing ones and find the first step where they diverge. That fork almost always lands on one of a handful of causes:
Fixing these tends to move several flaky cases at once, because one vague tool description affects every case that touches it. It's also why flaky cases deserve priority over new capability work: you're removing a coin flip that users will hit at production volume, where a 10% failure rate on a common path is thousands of bad sessions a week.
Once a flaky case is fixed, rerun it at k=10 or higher before you call it stable. 6/10 to 10/10 is good. 6/10 to 3/3 tells you very little, since three clean runs from a case that failed four in ten could just be luck.
- →Two tools whose descriptions overlap, so the agent picks between search_orders and get_order_history by mood.
- →An instruction that sets up a priority conflict ("be concise" against "always confirm details") with no stated tiebreak.
- →Retrieval ties, where two chunks score almost identically and the top-k cutoff decides which one the model sees.
- →An underspecified test case, where the expected answer is one of two defensible answers and the eval only accepts one.
- →Long context where the deciding fact sits deep in the middle and gets attended to some of the time.
Separate Judge Noise From Agent Noise
If you grade with an LLM judge, the judge is non-deterministic too. So a flaky case could mean the agent is varying, or the grader is, or both. Mix them up and you lose days. You end up rewriting a prompt to fix an agent that was producing the same correct answer on every single run, while the judge was the one flipping its verdict.
The check is cheap. Take one saved agent output and grade it five times. If the verdict changes, the judge is flaky on that case, and the rubric needs tightening before the agent gets touched. Then do the reverse: hold the judge fixed, rerun the agent, and compare outputs directly with a deterministic diff or assertion where you can.
Prefer deterministic assertions wherever the behaviour allows it. Did the agent call refund_order with the right order ID? Did the record end up in the right state? Those checks don't flip. Grading side effects instead of prose, covered in grading actions rather than answers, removes a whole layer of variance from the measurement. Save the LLM judge for the parts that really are judgement calls, and measure its own consistency once per rubric change.
Wire Flakiness Into the Release Gate
Running everything ten times on every commit gets expensive fast, so stratify. On a pull request, run the cases touched by the change at k=5, plus any case that was flaky in the last nightly run. Nightly, run the full suite at k=10. Weekly, or before a model version swap, push the highest-risk cases (anything that writes data or sends something to a customer) to k=20 and look at the tail.
Then gate on two numbers, not one. The pass rate must not drop beyond your tolerance, and the count of flaky cases must not rise. A change that holds pass rate steady while turning three stable-pass cases into 7/10 cases is a regression. Single-run gates can't see it. This slots straight into the CI-style regression gates that catch slow drift, and it's one of the parts that makes an eval harness the real deliverable rather than a demo script.
Store the per-run results, not just the aggregate. When a case goes from 10/10 to 8/10 after a vendor model update, you want the two failing traces on hand, with their seeds, model version and retrieved context. That history is also how you spot cases that have been quietly flaky for months, which tends to happen to the oldest cases in a suite.
A few heuristics I'd start with:
- →Never mark a case fixed on fewer than 10 consecutive passes.
- →Treat any case that writes, sends or deletes as release-blocking if it's flaky at all.
- →Don't let anyone rerun a red suite without the original red run being logged and visible.
- →Track the flaky count over time on the same chart as pass rate, so a rising line can't hide behind a flat one.
What's Still Hard, and Where to Start Monday
The thesis holds: per-case consistency across repeated runs tells you more about an agent's real quality than any single pass rate, and the flaky cases are the first thing to fix. It's not free, though, and some of it is still unsolved.
Cost scales linearly with k. Multi-turn cases with a simulated user scale worse, because the simulated user is a second non-deterministic model and its variance stacks on top of the agent's. So picking k is a judgement call between budget and confidence, and at the k values most teams can afford, the confidence bounds above stay uncomfortably wide. There's a plainer limit too. A suite only measures the cases in it. If a behaviour is flaky on inputs you never wrote down, you won't see it until production traffic finds it, which is why the suite has to keep pulling in real edge cases instead of freezing.
There's also no clean threshold for acceptable flakiness. A 9/10 case on an FAQ lookup and a 9/10 case on an account deletion carry very different risks. How you weight them is a product decision, and someone has to own it.
The first step costs an afternoon. Take your existing suite, run it ten times unchanged, and sort the cases into the three buckets. You'll get a list of flaky cases ranked by how often they flip, and that list is a better roadmap for the next two weeks than anything in your backlog.
Frequently asked questions
How many times should I run each eval case for an LLM agent?
Start at k=5 for cases touched by a change and k=10 nightly for the full suite, pushing high-risk cases to k=20. Fewer than 10 clean runs leaves the true failure rate bound above 25%, so don't call a case fixed on less.
Does setting temperature to 0 make LLM outputs deterministic?
No. Batching on the inference server changes floating-point reduction order, so identical requests can produce different tokens, and Thinking Machines got 80 distinct completions from 1,000 identical temperature-0 calls. In an agent, one flipped token can change which tool gets called next.
What is pass^k in agent evaluation?
pass^k is the probability an agent succeeds on all k independent attempts at the same task, introduced in the τ-bench paper. It exposes inconsistency that pass@1 hides: their GPT-4o agent went from about 61% at pass^1 to under 25% at pass^8 on retail tasks.
How do I tell if a flaky eval result comes from the agent or the LLM judge?
Grade one saved agent output several times; if the verdict changes, the judge is the source. Then hold grading fixed and rerun the agent, using deterministic assertions on tool calls and state wherever possible.
Take the Operational Bottleneck Audit
The Bottleneck Audit includes a repeated-run pass over your existing eval suite, so you see which agent behaviours are flaky before your users do.
Find out which agent behaviours are coin flips
We'll run your eval suite repeatedly, separate judge noise from agent noise, and hand back a ranked list of unstable cases with the divergence point for each.
Book a Discovery Call

