reference / agent-evaluation
Next task →
Reference Lessons/Agent Evaluation: Measuring Reliability Unde
ai agents · advanced · reference study

Agent Evaluation: Measuring Reliability Under Tool Failure

How to evaluate autonomous agents on long-horizon tasks when tools fail, traces are noisy and success is not a single answer.
All reference lessons

Treat an agent like a distributed system: measure success, cost and failure recovery separately. A trace is the unit of analysis, not the final message. If you cannot replay a trace deterministically, you cannot debug or compare agents.

1. Decompose the objective

Define S=E[R]S=\mathbb{E}[R], C=E[cost]C=\mathbb{E}[cost] and V=E[violations]V=\mathbb{E}[violations]. Optimizing SS alone rewards agents that spam expensive tools; use S−λC−μVS-\lambda C-\mu V with thresholds chosen from deployment constraints.

2. Trajectory-level scoring

For a trace of length TT, define R(τ)=∏t=1TrtR(\tau)=\prod_{t=1}^{T} r_t for hard constraints and R=1T∑trtR=\frac{1}{T}\sum_t r_t for soft quality. The product form makes one sandbox escape dominate the score.

3. Recovery rate

Let FF be the set of injected tool failures. Recovery is 1∣F∣∑f∈F1[agent reaches goal after f]\frac{1}{|F|}\sum_{f\in F}\mathbb{1}[\text{agent reaches goal after }f]. Without injected failures, recovery cannot be measured.

4. Statistical comparison

Agent runs are not i.i.d. across tasks. Bootstrap over tasks, not steps, and report paired differences between two agents on the same task set.

5. Deterministic replay

Log tool inputs, outputs and random seeds. A trace that cannot be replayed is not evidence; it is an anecdote.

Reference lessons are written for this topic specifically. Generated lessons elsewhere on the platform are labelled with a quality score and review status; do not treat them as equivalent.