Skip to content
Live evals: score runs as they finish
← All posts

Engineering · · 8 min read

Why agents fail quietly

A wrong answer from an agent rarely throws an error. Here is where the failures hide, and how to make them loud.

Tomás Ferreira

When a web request fails, you get a status code. When an agent fails, you usually get a polite, confident reply that answers the wrong question. Nothing in your logs looks unusual, and the first signal is a customer who writes back.

The three quiet failures

Across the runs we see, almost every silent failure falls into one of three groups: the agent retrieved the wrong context, a tool call failed and the agent carried on without it, or the model wandered past what its sources support.

None of these raise an exception. All of them are visible in a trace, if the trace records what went into and came out of each step.

Make the tool failure loud

The cheapest fix is a rule: a reply may not mention facts that a failed tool was meant to provide. That can be written as a check in a few lines.

check("no-claims-after-tool-failure", (run) => {
  const failed = run.spans.filter((s) => s.error);
  return failed.length === 0 || run.reply.cites.length === 0;
});

Checks like this cost almost nothing to run, so run them on live runs too, not just on a dataset.

Score what a rule cannot see

Wrong context and unsupported claims need judgement. A model as judge, given a short rubric and the retrieved passages, catches most of them. Keep the rubric to one sentence, and always store the judge's reason next to its score.

Close the loop

Every run that fails an eval is a test case you did not have to invent. Add it to a dataset, and the next change to your prompt has to pass it before it merges.

Next postWrite the rubric in one sentenceLong rubrics make inconsistent judges. A short, testable sentence scores more reliably and is easier to argue with.

Ship agents you can explain.

The first 50,000 spans each month are free. No card needed.