Skip to main content
Back to all articles
AI Engineering 6 min readUpdated September 18, 2026

A 90% Agent Is Not Reliable If It Fails a Different 10% Every Run.

A strong average eval score can hide an unstable agent. Repeat the same cases, measure pass^k and flaky-case rate, instrument per-step reliability, and gate releases on consistency instead of pass@1 alone.

By Salman Butt · Senior Full-Stack & Generative AI Engineer
#AI Agents#LLM Evals#Agent Reliability#pass^k#Consistency#TypeScript#Python#Production AI
On this page

An agent can score 90% on an eval suite and still feel unreliable in production.

The reason is simple: average success and repeatability are different properties.

Imagine two agents tested on the same 100 tasks.

Agent A always passes the same 90 and always fails the same 10.

Agent B passes every task about 90% of the time, but the failures move around from run to run.

Both can report a 90% average success rate.

Only one is predictable.

For a customer-facing agent, that difference matters. Users do not experience an average. They experience one run, and they expect the same request to behave roughly the same way tomorrow.

So I would not ship an agent based on pass@1 alone.

I want to know which cases are consistently correct, which are consistently broken, and which are simply flaky.

Run the same case more than once

The first change is boring: repeat every important eval case.

Not with a mocked deterministic agent. Use the same temperature, tools, retrieval, and runtime conditions you plan to ship.

Repeated agent eval runs and flaky result

That last label is the interesting one.

A case that passes 3/5 times is not just "60% good." It is evidence that the agent has an unstable decision boundary somewhere in the trajectory.

I like to record the repeated result explicitly.

type CaseResult = {  caseId: string;  runs: boolean[];};​function summarizeCase(  result: CaseResult,) {  const passes = result.runs.filter(Boolean).length;  const total = result.runs.length;​  return {    caseId: result.caseId,    successRate: passes / total,    consistentlyCorrect: passes === total,    consistentlyWrong: passes === 0,    flaky: passes > 0 && passes < total,  };}

Now the eval suite tells me something pass@1 cannot: where the nondeterminism lives.

pass@k and pass^k answer opposite questions

The names are annoyingly similar.

The meaning is not.

pass@k asks:

If I get *k* attempts, what is the chance that at least one succeeds?

That is useful when you can generate several candidates and keep the best one.

Code generation is the obvious example.

pass^k asks:

If I run the same task *k* times, how often do all of those runs succeed?

That is much stricter.

And for many user-facing agents, stricter is exactly what I want.

A support agent cannot tell the customer:

Text
Sorry that refund failed.Try the same request four more times.One of them usually works.

If reliability matters, success should survive repetition.

Anthropic's eval guidance makes this distinction explicitly: pass@k rises as you give the system more chances, while pass^k falls as you demand successful behavior across every repeated trial.

That is why a strong pass@k number can hide a weak product.

Add a consistency report to the suite

I do not need a complicated statistics platform to start.

A useful first report contains four numbers:

Text
mean success rateconsistently correct casesflaky casesconsistently wrong cases

For example:

function report(  results: CaseResult[],) {  const summaries = results.map(summarizeCase);​  const meanSuccess =    summaries.reduce(      (sum, item) => sum + item.successRate,      0,    ) / summaries.length;​  return {    meanSuccess,    consistentlyCorrect:      summaries.filter(        (item) => item.consistentlyCorrect,      ).length / summaries.length,    flaky:      summaries.filter(        (item) => item.flaky,      ).length,    consistentlyWrong:      summaries.filter(        (item) => item.consistentlyWrong,      ).length,  };}

The most useful output is often not the percentage.

It is the list of flaky case IDs.

Those are the tasks I want to inspect first.

A consistently wrong case may have a clear missing capability.

A flaky case is harder: the agent sometimes knows what to do and sometimes chooses a different trajectory.

That can point to ambiguous tool descriptions, retrieval ties, unstable planning, weak argument validation, or context that changes between runs.

Reliability decays across a long workflow

Repeated-run consistency is one problem.

Long-horizon execution creates another.

Suppose an agent has five important steps:

Text
understand request      0.97choose tool             0.95fill arguments          0.90interpret tool result   0.96produce final answer    0.95

Those numbers look good independently.

If the steps were independent, the rough end-to-end success would be their product:

Text
0.97 × 0.95 × 0.90 × 0.96 × 0.95≈ 0.75

A workflow made of "mostly reliable" steps can still become a 75% product.

Real agent steps are not perfectly independent, so I do not use that multiplication as a precise production forecast.

I use it as a warning:

small failure rates compound.

That is why a top-line task score is not enough for debugging.

I also want reliability by stage.

Instrument the trajectory, not only the final answer

For a tool-using agent, I normally break evaluation into a few stable checkpoints:

Agent reliability execution pipeline

Then each repeated run can tell me *where* it failed.

type StepResult = {  name: string;  ok: boolean;};​type AgentRun = {  caseId: string;  steps: StepResult[];};​function stepReliability(  runs: AgentRun[],) {  const stats = new Map<    string,    { passed: number; total: number }  >();​  for (const run of runs) {    for (const step of run.steps) {      const current =        stats.get(step.name) ??        { passed: 0, total: 0 };​      current.total += 1;​      if (step.ok) {        current.passed += 1;      }​      stats.set(step.name, current);    }  }​  return Object.fromEntries(    [...stats.entries()].map(      ([name, value]) => [        name,        value.passed / value.total,      ],    ),  );}

This turns:

Text
agent reliability dropped

into something actionable:

Text
tool selection        0.98argument construction 0.81tool execution        0.99result interpretation 0.95

Now I know where to spend engineering time.

Maybe the tool schema is ambiguous.

Maybe required fields are weakly described.

Maybe the model is copying stale values from conversation history.

The final score could not tell me that.

Do not declare a case reliable after three lucky runs

Repeated evals create a new trap.

You run a difficult case three times.

It passes all three.

That feels reassuring.

It should not.

Three successful observations are still a tiny sample.

For release gates, I prefer either enough repeated trials to make the result useful or a confidence interval around the estimated success rate.

A simple Wilson lower bound is practical for a binary pass/fail case.

function wilsonLowerBound(  passes: number,  total: number,  z = 1.96,) {  if (total === 0) return 0;​  const p = passes / total;  const z2 = z * z;  const denominator = 1 + z2 / total;​  const center =    p + z2 / (2 * total);​  const margin =    z *    Math.sqrt(      (p * (1 - p) +        z2 / (4 * total)) /        total,    );​  return (    (center - margin) /    denominator  );}

The lower bound is intentionally pessimistic.

That is useful when the question is:

How confident am I that this case is actually reliable?

Not:

What is the nicest number I can put on the dashboard?

Gate releases on stability, not only the mean

I would not replace pass@1.

I would add consistency beside it.

A release gate might look like:

Text
mean success rate       >= 0.92consistently correct    >= 0.80flaky critical cases    == 0no step regression      > allowed tolerance

Those values are examples, not universal thresholds.

The important part is the shape of the gate.

An agent should not be allowed through simply because improvements on easy cases compensate for instability on a critical refund, booking, or authorization flow.

I also keep critical cases separate from the suite average.

Ten perfect FAQ answers should not hide one flaky destructive action.

Test realistic sources of variance

If every repeated run uses an identical frozen environment, you may still miss the kind of instability users see.

For the cases that matter most, I vary things that should *not* change the correct outcome:

  • harmless wording changes;
  • equivalent document ordering;
  • retrieval ties;
  • tool-result ordering;
  • small conversation-history differences;
  • transient tool retries;
  • different but valid IDs or account examples.

This is not adversarial red-teaming.

It is checking whether the behavior is robust to ordinary production variation.

A reliable agent should not need the prompt to land on exactly the same token sequence every time.

The metric I care about depends on the product

There is no single reliability number that works everywhere.

For a coding agent generating five candidate patches, pass@k can be useful because the product may genuinely choose the best candidate.

For a customer-support agent issuing one refund, pass^k and flaky-case rate matter much more.

For a research agent, I may care about answer correctness plus citation stability across repeated runs.

For an internal workflow, I may care about whether the final database state is equivalent even when the exact trajectory differs.

The metric should describe the failure users actually experience.

That is the part teams often skip.

They inherit a benchmark metric and then optimize the product around the metric instead of the other way around.

The takeaway

A 90% average does not tell you whether your agent is reliably right or unpredictably right.

Run the same cases repeatedly.

Track which cases are always correct, always wrong, and flaky.

Use pass^k when consistency matters.

Instrument the steps so you can see where long workflows lose reliability.

And do not let a tiny sample convince you that a case is stable.

The goal is not to make the eval dashboard stricter.

The goal is to make it describe the product users actually get.

Because the worst agent failure is not always "it cannot do this."

Sometimes it is:

it can do this, but not reliably enough for anyone to trust it.

References

KEEP READING

Related engineering notes