Özer Cem KELAHMETKELAHMET
Articles · Agent evaluation

Agent evaluation step by step: trajectory matching, LLM judges, pass^k and benchmark maths

Agents fail in the middle of a run, not just at the end. This guide shows how to score the path an agent takes, how far to trust an LLM judge, why pass^k beats pass@k for reliability, and how to read benchmark numbers like SWE-bench Verified and tau-bench, with runnable code and worked numbers.

Download Markdown
At a glance
Reading time
14 min
Sections
9
Code examples
6
Tables
2
Sources
8
Published
23 Nov 2026
In 30 seconds
What changed
DeepEval 4.3.4 ships a full set of agent metrics
Why it matters
Public benchmarks tell you which models and scaffolds are broadly capable.
What to do
Write outcome checks first

Evaluating a chatbot mostly means grading its final answer. Evaluating an agent is harder, because the answer is the last step of a run that may include ten tool calls. Two agents can give the same final answer, yet one checked the damage report before refunding an order and the other skipped it. One run can succeed today and fail tomorrow on the same input. A good agent evaluation therefore looks at three things: the final outcome, the path (the trajectory of tool calls), and the consistency across repeated trials.

This article builds that evaluation step by step. It runs trajectory matching with LangChain's agentevals package, shows how to set up an LLM judge and measure its agreement with humans, computes pass@k and pass^k from repeated trials, and puts confidence intervals on benchmark scores. It ends with what the main public agent benchmarks measure and what changed in them recently.

What happened

DeepEval 4.3.4 ships a full set of agent metrics (11 November 2026)

DeepEval 4.3.4 was published on 11 November 2026. Its deepeval.metrics module includes agent-focused metrics such as TaskCompletionMetric, ToolCorrectnessMetric, ArgumentCorrectnessMetric, StepEfficiencyMetric, PlanAdherenceMetric, PlanQualityMetric, GoalAccuracyMetric, AgentLoopDetectionMetric and ToolPermissionMetric. Several of these are covered in our DeepEval 4.3 agent metrics guide.

OpenEvals 0.2.5 (12 November 2026)

LangChain's openevals package, which provides create_llm_as_judge and ready-made judge prompts such as CORRECTNESS_PROMPT, PLAN_ADHERENCE_PROMPT and PROMPT_INJECTION_PROMPT, released versions 0.2.3 to 0.2.5 on 12 November 2026. Its sister package agentevals (0.0.9) supplies the trajectory evaluators used below.

tau-bench 2.0 adds six languages and new judges (19 October 2026)

Sierra's tau-bench repository released version 2.0.0 on 19 October 2026. It adds τ-i18n, the same airline, retail and telecom customer-service tasks in English, Spanish, Portuguese, Hindi, Chinese and Korean, in text and full-duplex voice. It also adds an intake domain for exact entity capture over 200 tasks and post-run judges that, per the README, "do not change the task reward". The maintainers state that 2.0 English scores are not comparable with the 1.x leaderboard, because retail and telecom tasks were replaced and the grading judge changed.

Three layers of agent evaluation

An analogy from driving tests helps. The examiner checks whether you arrived (outcome), whether you signalled and checked mirrors on the way (trajectory), and would not pass you if you only managed it one time in three (consistency).

Table 1. Three layers of agent evaluation
Layer Question Typical method Cost
Outcome Did the task get done? Check final state or answer; LLM judge Low to medium
Trajectory Was the path correct and safe? Match tool calls against a reference; trajectory judge Low
Consistency Does it work every time? Repeat trials; pass^k High (k times the runs)

Outcome checks should be deterministic where possible. tau-bench, for example, compares the final database state with the expected state rather than asking a model whether the agent did well. SWE-bench runs the repository's tests on the agent's patch. Use an LLM judge only for things code cannot check, such as tone or whether an explanation is correct.

Trajectory matching, run offline

The agentevals package compares an agent's messages with a reference trajectory. It has four match modes for the sequence of tool calls and separate modes for tool arguments. The test case below is a refund agent whose reference path is: get the order, check the damage report, issue the refund.

# pip install agentevals==0.0.9
from agentevals.trajectory.match import create_trajectory_match_evaluator

def ai(*calls):
    return {"role": "assistant", "content": "", "tool_calls": [
        {"function": {"name": n, "arguments": a}} for n, a in calls]}

user = {"role": "user", "content": "Refund order 1042 if it arrived damaged."}
reference = [user,
    ai(("get_order", '{"order_id": "1042"}')),
    ai(("check_damage_report", '{"order_id": "1042"}')),
    ai(("issue_refund", '{"order_id": "1042", "amount": 59.9}')),
    {"role": "assistant", "content": "Refund of 59.90 issued."}]

candidates = {
    "same steps, same order": reference,
    "skipped the damage check": [user, reference[1], reference[3], reference[4]],
    "extra lookup + swapped order": [user, reference[2], ai(("get_customer", '{"id": "c9"}')), reference[1], reference[3], reference[4]],
    "wrong refund amount": [user, reference[1], reference[2], ai(("issue_refund", '{"order_id": "1042", "amount": 99.0}')), reference[4]],
}
modes = ["strict", "unordered", "subset", "superset"]
evals = {m: create_trajectory_match_evaluator(trajectory_match_mode=m) for m in modes}
print(f"{'candidate':32}" + "".join(f"{m:>10}" for m in modes))
for name, traj in candidates.items():
    row = [evals[m](outputs=traj, reference_outputs=reference)["score"] for m in modes]
    print(f"{name:32}" + "".join(f"{str(r):>10}" for r in row))
candidate                           strict unordered    subset  superset
same steps, same order                True      True      True      True
skipped the damage check             False     False      True     False
extra lookup + swapped order         False     False     False      True
wrong refund amount                  False     False     False     False

How to read the table:

  • Strict requires the same tool calls in the same order. Only the exact copy passes.
  • Unordered requires the same set of calls in any order. Swapping order alone would pass, but the extra get_customer call fails it.
  • Subset passes if the agent made no calls outside the reference. Skipping the damage check passes, which is dangerous here because the check is a business rule.
  • Superset passes if the agent made at least the reference calls. The run with an extra lookup passes; the run that skipped the check fails.
  • Arguments matter. With the default tool_args_match_mode="exact", the wrong refund amount fails every mode. You can relax this per tool with tool_args_match_overrides, for example to ignore a free-text search query.

The lesson is to choose the mode from the business rule. For a refund agent, "superset with exact arguments" catches skipped safety steps while allowing harmless extra lookups. For a cost-sensitive agent, "subset" catches wasted calls. Many teams run two modes and report both.

LLM-as-judge, and how far to trust it

When code cannot check the outcome, a model can grade it. The openevals package wraps this pattern: create_llm_as_judge(prompt=CORRECTNESS_PROMPT, model=...) returns an evaluator that fills the prompt's {inputs}, {outputs} and {reference_outputs} and returns a score with reasoning. For whole runs, agentevals.trajectory.llm.create_trajectory_llm_as_judge with TRAJECTORY_ACCURACY_PROMPT asks a model whether the sequence of steps was reasonable, without needing a reference.

A judge is a measuring instrument, so calibrate it before you rely on it. Label a sample of runs by hand, run the judge on the same runs, and measure agreement beyond chance with Cohen's kappa. Here is the arithmetic for 40 runs:

tp, fp, fn, tn = 18, 4, 3, 15        # judge pass/fail against human pass/fail
N = tp + fp + fn + tn
po = (tp + tn) / N                                                  # observed agreement
pe = ((tp + fp) / N) * ((tp + fn) / N) + ((fn + tn) / N) * ((fp + tn) / N)   # chance agreement
print(f"raw agreement={po:.3f}  chance={pe:.3f}  kappa={(po - pe) / (1 - pe):.3f}")
# raw agreement=0.825  chance=0.503  kappa=0.648

The judge agrees with humans 82.5% of the time, but half of that would happen by chance, so kappa is 0.648. That is useful for spotting regressions but not good enough to grade individual high-stakes runs. Look at the four false passes in particular: a judge that passes bad runs is worse than one that fails good ones. The LLM judge agreement simulation lets you vary these counts, and LLM-as-judge covers common biases such as preferring longer answers.

Consistency: pass@k versus pass^k

Agents are stochastic. If you run each task several times, two summaries are useful and they answer opposite questions:

  • pass@k is the chance that at least one of k attempts succeeds. It suits settings where you can check results and keep the best, like generating code that tests can verify.
  • pass^k (pass-hat-k), introduced with tau-bench, is the chance that all k attempts succeed. It suits customer-facing agents, where every conversation must work.

With n trials per task and c successes, the unbiased estimates are pass@k = 1 − C(n−c, k) / C(n, k) and pass^k = C(c, k) / C(n, k), averaged over tasks. For ten tasks with eight trials each:

from math import comb
successes = [8, 8, 7, 6, 6, 5, 4, 2, 1, 0]          # 10 tasks, 8 trials each
n = 8
def pass_at_k(c, k):   return 1 - comb(n - c, k) / comb(n, k)
def pass_hat_k(c, k):  return comb(c, k) / comb(n, k)
for k in (1, 2, 4, 8):
    pa = sum(pass_at_k(c, k) for c in successes) / len(successes)
    ph = sum(pass_hat_k(c, k) for c in successes) / len(successes)
    print(f"k={k}: pass@k={pa:.3f}  pass^k={ph:.3f}")
k=1: pass@k=0.588  pass^k=0.588
k=2: pass@k=0.732  pass^k=0.443
k=4: pass@k=0.827  pass^k=0.301
k=8: pass@k=0.900  pass^k=0.200

At k=1 both equal the plain success rate, 58.8%. At k=8 the same agent looks like a 90% system under pass@k and a 20% system under pass^k, because only two of the ten tasks succeeded in all eight trials. If your agent talks to customers, pass^k is the number to watch. The pass@k versus pass^k simulation makes the gap visible.

Reading benchmark numbers

Table 2. Reading benchmark numbers
Benchmark What the agent does How it is graded Size
SWE-bench Verified Fixes real GitHub issues in Python repositories Repository tests on the agent's patch 500 tasks confirmed solvable by engineers
tau-bench 2.0 Serves simulated customers with tools and policies Final database state plus checks; pass^k 50 frozen tasks per domain per language in text-v1
GAIA Answers questions needing browsing, files and reasoning Exact match on a short answer 466 questions in three difficulty levels

Two pieces of arithmetic keep benchmark claims honest.

Every score has an error bar. An agent that solves 362 of 500 SWE-bench Verified tasks scores 72.4%, but a 95% Wilson interval runs from 68.3% to 76.1%. A rival at 74% is inside that band. The SWE-bench confidence and cost simulation shows how this interacts with cost per task.

Compare agents on the same tasks. When two agents run the same 500 tasks, look at the discordant pairs. If agent A alone solves 41 tasks and agent B alone solves 27, McNemar's statistic is (41 − 27) / √(41 + 27) = 1.70. That is below 1.96, so the difference is not significant at the 5% level, even though A is 14 tasks ahead. The paired evaluation simulation walks through this test.

Also check what was held constant. Scaffold, tool set, time limit, number of attempts and the grading version all move scores. tau-bench 2.0's note that its English scores are not comparable with 1.x is a good example; our article a score is only as good as its report lists what a fair report should include.

What it means in practice

Public benchmarks tell you which models and scaffolds are broadly capable. They do not tell you whether your agent follows your refund policy. For that you need a small, private test set built from your own traces: 30 to 100 representative tasks with reference trajectories where the path matters, deterministic outcome checks where possible, and a calibrated judge for the rest. Run each task several times and report pass^k alongside the plain success rate.

A practical weekly loop looks like this. On Monday, pull the traces from the past week that ended in an error, a user complaint, a low judge score or an unusually high step count. Read a sample and group them by cause: wrong tool chosen, wrong argument, missing step, bad final answer, or a policy breach. For each group, add two or three cases to the private suite with the expected outcome and, where the path matters, a reference trajectory. Then rerun the suite against the current production version so the new cases start as known failures. When a fix lands, the same cases show whether it worked and whether anything else broke.

The metric mix should follow the failure groups. Tool selection errors call for trajectory matching or DeepEval's ToolCorrectnessMetric. Wrong arguments call for exact argument checks or ArgumentCorrectnessMetric. Wasted steps call for a step budget or StepEfficiencyMetric. Final answer quality calls for a calibrated judge. Keep the number of metrics small enough that someone actually reads the report; three to five per suite is usually enough.

Make the evaluation part of the release process. A change to a prompt, a tool description or the model should trigger the suite, and a drop beyond the noise band should block the release. See evals for how teams organise these suites.

What to do now

  1. Write outcome checks first. Compare final state, files or answers in code wherever you can, before reaching for a judge.
  2. Add reference trajectories for rule-bound tasks. Use superset matching with exact arguments for steps that must never be skipped.
  3. Calibrate every judge. Hand-label at least 40 runs, compute kappa, and read the false passes.
  4. Repeat trials. Run each task at least four times and report pass^k next to the plain success rate.
  5. Put intervals on scores. Report a 95% interval and use paired tests when comparing two versions on the same tasks.
  6. Pin benchmark versions. Record the benchmark release, task set and grader version with every score.
  7. Feed failures back. Turn failing production traces into new test cases each week.
  8. Track cost with quality. Record tokens and cost per task, so a gain that triples spend is visible.

Risks and open questions

Judges can be gamed. An agent tuned against one judge prompt may learn to please it rather than solve the task. Rotate judges and keep a human-labelled holdout.

Reference trajectories go stale. When tools or policies change, old references fail good runs. Version them with the code.

Benchmarks leak and saturate. Public tasks end up in training data, and top scores bunch together inside the error bars. Private, recent tasks matter more over time.

Simulated users are not real users. tau-bench uses an LLM to play the customer, and that simulator's behaviour shapes the score. Its 2.0 release changed the simulator setup, which is one reason scores are not comparable.

Watch next: whether more benchmarks report pass^k by default, how multilingual and voice versions such as τ-i18n change agent rankings, and whether trajectory judges become reliable enough to replace reference paths.

Frequently asked questions

What is trajectory evaluation?

It scores the sequence of steps an agent took, usually its tool calls and their arguments, rather than only the final answer. It catches runs that reach the right answer the wrong way, such as skipping a required check. The agentevals match modes (strict, unordered, subset, superset) are one way to do it.

When should I use an LLM judge instead of code?

Use code when the result can be checked exactly, such as a database state, a test suite or a short answer. Use a judge for qualities code cannot measure, such as helpfulness, tone or reasoning quality. Always measure the judge's agreement with human labels first.

What is the difference between pass@k and pass^k?

pass@k is the chance that at least one of k attempts succeeds, and it rises with k. pass^k is the chance that all k attempts succeed, and it falls with k. In the worked example the same agent scored 0.900 on pass@8 and 0.200 on pass^8.

Can I compare my tau-bench score with an older leaderboard entry?

Only if you used the same release. The tau-bench maintainers state that 2.0 English scores are not comparable with the 1.x leaderboard and keep the two on separate tabs. Use the v1.0.1 release if you need 1.x-comparable numbers.

How many test cases does an agent evaluation need?

It depends on the difference you want to detect. With 500 tasks, a 72.4% score still has an interval about 8 points wide. A private suite of 50 to 100 tasks is enough to catch large regressions; use paired comparisons and repeated trials to detect smaller changes.

Summary

Agent evaluation has three layers: the outcome, the trajectory and the consistency across runs. Trajectory matching with agentevals showed how the four match modes treat skipped, extra and wrong tool calls differently. A judge with 82.5% raw agreement turned out to have a kappa of 0.648 once chance was removed. Repeated trials showed the same agent at 90% under pass@8 and 20% under pass^8. Benchmark scores need intervals and paired tests, and versions matter: tau-bench 2.0 broke comparability with 1.x on purpose. Build a private suite from your own traces, calibrate your judges, and report pass^k.

Sources

Cite this article

Kelahmet, Ö. C. (2026, November 23). Agent evaluation step by step: trajectory matching, LLM judges, pass^k and benchmark maths. Özer Cem KELAHMET. https://www.ozercemkelahmet.com/articles/agent-evaluation-trajectories-judges-benchmarks

BibTeX
@online{kelahmet2026agent,
  author = {Kelahmet, {\"O}zer Cem},
  title  = {{Agent evaluation step by step: trajectory matching, LLM judges, pass^k and benchmark maths}},
  year   = {2026},
  month  = {nov},
  url    = {https://www.ozercemkelahmet.com/articles/agent-evaluation-trajectories-judges-benchmarks}
}
Version historyfirst version
  1. Published

Factual corrections are listed here with what changed. Wording and formatting edits are not listed.

Last updated Nov 23, 2026
Type to search.
    ↑↓ navigate↵ open