Skip to main content

Chapter 9. Benchmarks and Tooling for Offline Evaluation

Public Benchmarks: Reading, Using, and Distrusting Them

Two vendors say their agents lead the same public leaderboard. One used a different scaffold, model snapshot, and retry policy, while the other averaged results over repeated runs. Both reports may be accurate, but their numbers do not necessarily describe the same experiment. Before choosing an agent for a product, the team needs to understand what was measured and how those conditions compare with its own.

A benchmark is more than a collection of questions: it includes a task set, environment, protocol, and scoring procedure. A public benchmark gives teams a shared way to probe capability and compare tested configurations, but it does not certify an agent for every use. This chapter follows a leaderboard result back to its evidence, then considers how evaluation tools can help a team reproduce that evidence without letting a tool define what the result means.

After this chapter you will be able to:

  • separate the task set, harness, model, and scoring oracle when reading a result;
  • spot risks from scaffold changes, contamination, and benchmark saturation;
  • interpret leaderboard scores with uncertainty and reproducibility in view;
  • use public tasks to guide test design without turning their score into a release gate;
  • adapt benchmark ideas into a protected evaluation for your own product.

Illustrative case. The vendor scores and comparisons here are hypothetical. Benchmark descriptions and citations point to published sources.

9.1 A survey of agent benchmarks

The vendors’ leaderboard may tell us where to start, but the benchmark’s tasks determine what its score can mean. AgentBench spans interactive environments; WebArena evaluates browser tasks in realistic websites; SWE-bench evaluates repository-level issue resolution; BFCL focuses on function calls; and \(\tau\)-bench evaluates tool-agent-user interactions against domain policies and resulting state [1], [2], [3], [4], [5]. A general assistant benchmark such as GAIA asks a different set of questions [6]. Consequently, a strong result on one is evidence about its own tasks, not interchangeable evidence for all the others.

Before you adopt a benchmark, record the capability it targets, where its tasks came from, how closely its environment matches real use, what oracle scores outcomes, which tools are allowed, whether tests are exposed, how many runs are used, which scoring version applies, and what the license permits. This review matters because realistic tasks do not rescue an unreliable oracle. For a narrow question, exact state checks may give firmer evidence.

The results can then suggest a testable hypothesis: perhaps tool selection is fragile, long-horizon tasks fail, or coding scores depend on test quality. Check that hypothesis against internal tasks before changing the product. Every score on a dashboard should help answer a specific decision question.

9.2 Scaffold and harness sensitivity

Even when two submissions use the same tasks, they may not be testing the same system. The harness covers prompts, tool wrappers, retries, context formatting, memory, stop conditions, and environment setup; any of these can move a score while the model remains fixed. For that reason, the model and harness belong in the reported configuration together.

When comparing models, hold the harness fixed if you can, while checking that it is compatible with each model. This isolates some differences, but a fixed harness may favor one model or fail to represent its intended deployment. If both model and harness change, report a system comparison rather than attributing the result to the model alone. Save tool versions and run settings, describe the scoring method, and rerun a baseline after meaningful changes. When the product retries, show first-attempt and eventual completion rates; an eventual pass can conceal repeated failures along the way.

9.3 Contamination, saturation, and benchmark retirement

The benchmark may also have influenced the system before the reported run. Contamination happens when evaluation tasks or answers influence training, prompt design, or repeated development choices, and public availability makes it difficult to prevent entirely. Separate public development tasks from private holdouts, refresh some items over time, and investigate unusually large score changes. A high score alone does not demonstrate contamination, and a private holdout is not automatically independent if related material influenced development.

Even without clear evidence of contamination, a benchmark can lose its usefulness. Saturation means it no longer separates candidates for your decision—for instance, nearly every system passes its narrow task set. Revise or retire it if tasks leak, the environment becomes obsolete, the oracle fails, or scores stop tracking product outcomes. Preserve old versions to keep trends interpretable, and document changes to the task set.

9.4 Reading a leaderboard critically

Return to the two vendor claims. Before comparing their ranks, the team needs the conditions behind the numbers:

  • Are systems tested on the same split, scaffold, model date, and tool permissions?
  • Is the score from one run, a mean, or a repeated-run reliability measure?
  • Are confidence intervals or per-task results available?
  • How are abstentions, timeouts, retries, and partial credit scored?
  • Who submitted the result, and can you reproduce it?
  • Are there safety or cost dimensions absent from the headline metric?

The gap between two scores may reflect sampling noise, a harness choice, or both. Where task-level results are available under comparable conditions, paired analysis and concrete failures can reveal more than rank order. The uncertainty also depends on the claim: a fixed benchmark score describes those tasks, while generalization to future tasks requires a defensible sampling frame. Thus, a leaderboard cannot by itself tell you which vendor will best meet your operational needs.

9.5 Turning public benchmarks into internal ones

The leaderboard can still be useful even when it cannot decide the purchase: its failures may suggest task patterns worth investigating locally. Define your product’s task categories, make local variants from approved data, write explicit outcome oracles, and set aside a private holdout. Before importing data, check provenance and license terms, and include failure slices that reflect your users, policies, tools, and risks.

Keep the public benchmark report separate from the release scorecard. Public results provide research context; internal evidence should drive product decisions, with its sampling, measurement, and governance assumptions documented. If benchmark tasks informed development, they are not independent validation.

Tooling Landscape and Practical Patterns

Suppose the team now wants to run its own benchmark. It picks a framework because an example notebook runs in minutes, only to find six months later that important labels, traces, and graders live in a hosted format the team cannot export. The tool should speed up the work, while the evaluation contract defines what a result means and remains independent of any vendor API.

The tooling landscape includes task runners, metric and judge libraries, tracing, annotation platforms, datasets, red-team scanners, and experiment and reporting platforms. Each solves a different part of the problem, so the team needs to know which responsibilities it is assigning to each tool. An adapter boundary between the tool and the task helps it retain its cases and oracle if the surrounding platform changes.

After this chapter you will be able to:

  • sort evaluation tools by the role they play in the lifecycle;
  • compare portability, reproducibility, privacy, and operating needs;
  • run one deterministic check through a common scoring contract;
  • connect an evaluation to an agent framework without tying the benchmark to that framework.

Illustrative case. Framework outputs here are synthetic; they are neither performance results nor claims about current features. Check current documentation before adopting a tool version.

9.6 Categories of tools

Choosing a tool begins with the role it will play in the evaluation lifecycle:

Category Examples of responsibility Questions to ask
Evaluation frameworks Task execution, scorers, repeatable runs Can the runner isolate state and preserve task versions?
Tracing Model/tool spans, latency, errors Can traces be sampled, redacted, exported, and replayed?
Platforms Dataset, annotation, dashboards, collaboration Who owns the data and how do you leave?
Red-team scanners Adversarial case generation and checks What threat model and false-negative evidence exist?
Custom code Product-specific state and policy oracles Is it versioned, tested, and independently reviewed?

Inspect AI and DeepEval serve different workflows, and both can use shared Python task data and deterministic product oracles [7], [8]. Their availability does not remove the team’s measurement responsibilities: neither tool, by itself, validates a judge or makes a task set representative.

9.7 Selection criteria and portability

Once the required roles are clear, compare candidate tools on integration effort, reproducibility, data governance, export formats, versioning, access control, offline support, cost, and operational ownership. A pilot should also exercise failure and exit scenarios: interrupt a run, upgrade a grader, remove a task, switch a model, and export records to another tool.

Keep canonical task schemas, expected outcomes, and safety constraints in version control where practical. An adapter can then translate framework-specific scorers into one result schema: run ID, metric name/version, score or label, evidence, and status. Reviewers have one format to inspect, and teams are less likely to let parallel metric definitions drift.

9.8 Worked example: the same eval in three tools

Consider a small contract: the observed refund state must equal the expected state. A Python function can implement that comparison, while adapters translate its result into framework-specific types. The function must reject missing or malformed evidence rather than treating two absent values as a match:

def state_matches(expected: dict, observed: dict) -> bool:
    for state in (expected, observed):
        if "refunded" not in state or type(state["refunded"]) is not bool:
            raise ValueError("refunded must be present and boolean")
    return expected["refunded"] == observed["refunded"]

expected = {"refunded": True}
observed = {"refunded": True}
print(state_matches(expected, observed))
True

The Inspect AI adapter can return a Score; the DeepEval adapter can populate a custom metric; a framework-neutral runner can store JSON. Each representation still depends on the evidence supplied to the function: it compares values but does not retrieve authoritative state, check the order’s identity, or verify a transaction itself. Those responsibilities belong to the surrounding task and evidence collection. Keep framework imports at the integration edges, and check each adapter against pass, fail, error, and missing-evidence cases so that it preserves the same meaning. The example illustrates the boundary, not a complete framework walkthrough.

9.9 Integrating with your agent framework

Portability matters not only when storing a score, but also when collecting the events behind it. Capture evidence at stable boundaries: model request, tool request and result, state change, and final response. A provider-neutral agent interface makes model adapters replaceable without rewriting task data, while framework callbacks can capture events when they do so consistently. Otherwise, add a small wrapper.

Go beyond the framework’s demo path. Verify that evaluation and production exercise the same critical authorization and validation logic. Run tests in isolated environments using synthetic data, pin dependencies, and save the adapter version with each run.

Chapter summary

Public benchmarks

The public result is a starting point for investigation, not the end of the product decision:

  • A benchmark result depends on the tasks, harness, environment, oracle, and protocol—not just the benchmark name.
  • To compare systems, check scaffolds, retry behavior, run counts, and scoring rules.
  • Public exposure brings contamination and saturation risks; a strong score alone confirms neither.
  • Inspect task-level evidence and uncertainty before drawing conclusions from rank order.
  • Use public results to shape internal tests and hypotheses, not to certify production readiness.
  • Keep benchmark versions and record data-use rights.

For product managers. Which decision will this benchmark inform, and how much does its environment resemble your product and risks? Ask how the result was reproduced, how many runs contributed, whether cost and safety were measured, and what evidence you still need internally.

Evaluation tooling

The tooling should preserve that evidence and its meaning as the evaluation evolves:

  • Pick tools for the job; no platform can guarantee a valid evaluation on its own.
  • Keep canonical tasks, constraints, and product oracles outside framework-specific APIs.
  • Before adoption, try exporting and replaying results, changing versions, and recovering from failures.
  • Use a shared result schema across Inspect AI, DeepEval, and other platforms.
  • Instrument model, tool, state, and response events at observable boundaries.

For product managers. What work will the tool make easier, and who will run it every day? Can the team export tasks, labels, and traces? Make a failure replay and a migration or exit test part of the pilot.

Hands-on labs (Python)

Lab 1: Public benchmarks

Run python code\ch19\lab_benchmarks.py with code on Python’s module search path. The ch19 path is a retained legacy lab identifier. The fictional rows compare a headline ranking with a separately supplied repeated-run reliability ranking:

from bookkit.system_eval import benchmark_summary

rows = [
    {"name": "North", "score": 0.82, "pass_k": 0.54, "runs": 8},
    {"name": "South", "score": 0.79, "pass_k": 0.62, "runs": 8},
]
print(benchmark_summary(rows))
{'headline_leader': 'North', 'reliability_leader': 'South', 'same_leader': False}

North leads on the headline score, while South leads on the supplied reliability measure. The helper merely compares those numbers: it does not calculate pass_k from eight runs, validate the run count, or quantify uncertainty. A real report must therefore define the repeated-run estimand, its \(k\), the task and run denominators, and the sampling protocol before comparing systems. The helper also selects the first row in a tie rather than reporting joint leaders.

Lab 2: Evaluation tooling

Run python code\ch21\lab_tooling.py with code on Python’s module search path. Its ch21 path is also a legacy lab identifier. It maps one supplied deterministic result to three neutral result envelopes, illustrating the portability boundary without depending on current framework APIs.

from bookkit.system_eval import result_envelopes

print(result_envelopes("state-match", passed=True, evidence="refund_state=true"))
{'canonical': {'metric': 'state-match', 'passed': True, 'evidence': 'refund_state=true'}, 'inspect_adapter': {'score': 1.0, 'explanation': 'refund_state=true'}, 'deepeval_adapter': {'success': True, 'reason': 'refund_state=true'}}

These dictionaries are illustrative envelopes, not actual Inspect AI or DeepEval adapter executions. Because the helper accepts only a boolean result, it cannot represent an error or missing evidence; production adapters need explicit statuses and tests that preserve them.

Exercises

Use the exercises to move from interpreting a public result to designing evidence and tooling for a specific decision.

Public benchmarks

  1. Conceptual. Describe a valid benchmark result that would not help answer a decision about your product.
  2. Audit. Pick a public benchmark and document its environment, oracle, run protocol, and likely contamination paths.
  3. Hands-on. Adjust the lab scores until both systems tie. Observe that the helper selects the first row, then describe how an actual report should represent the tie and what other evidence would help you choose.
  4. Design. Plan a private holdout that protects evaluation without slowing development to a crawl.
  5. Discussion. What evidence would tell your team to retire a benchmark instead of adding tasks?

Evaluation tooling

  1. Selection. Compare an open-source runner with a hosted platform using a weighted decision matrix.
  2. Hands-on. Add an error result to the adapter and check that every format retains the error status.
  3. Architecture. Find where your agent framework exposes tool results and state changes.
  4. Migration. Plan a test that would let you exit a vendor-hosted annotation workflow.
  5. Discussion. When does framework-native code justify the cost of reduced portability?

Further reading

The benchmark papers and tool documentation below are starting points for checking task design, evaluation protocols, and current integration capabilities:

Public benchmarks

  • Liu et al., AgentBench, for interactive evaluation across distinct environments [1].
  • Patil et al., BFCL, for function-calling and stateful agent evaluation [4].
  • Yao et al., \(\tau\)-bench, for policy-aware interaction and repeated-run reliability [5].
  • Zhou et al., WebArena, and Jimenez et al., SWE-bench, for browser and software-agent tasks [2], [3].

Evaluation tooling

  • Inspect AI documentation, for task and scorer workflows [7].
  • DeepEval project documentation, for evaluation and custom-metric patterns [8].
  • OpenTelemetry GenAI conventions, for tracing integration [9].
  • Model Context Protocol specification, for portable tool interaction concepts [10].
[1]
X. Liu, H. Yu, H. Zhang, et al., “AgentBench: Evaluating LLMs as agents,” in International conference on learning representations (ICLR), 2024. Available: https://arxiv.org/abs/2308.03688
[2]
S. Zhou, F. F. Xu, H. Zhu, et al., “WebArena: A realistic web environment for building autonomous agents,” in International conference on learning representations (ICLR), 2024. Available: https://arxiv.org/abs/2307.13854
[3]
C. E. Jimenez, J. Yang, A. Wettig, et al., “SWE-bench: Can language models resolve real-world GitHub issues?” in International conference on learning representations (ICLR), 2024. Available: https://openreview.net/forum?id=VTF8yNQM66
[4]
S. G. Patil et al., “The berkeley function calling leaderboard (BFCL): From tool use to agentic evaluation of large language models,” in Proceedings of the 42nd international conference on machine learning, Proceedings of Machine Learning Research, 2025, pp. 48371–48392. Available: https://proceedings.mlr.press/v267/patil25a.html
[5]
S. Yao, N. Shinn, P. Razavi, and K. Narasimhan, “\(\tau\)-bench: A benchmark for tool-agent-user interaction in real-world domains.” 2024. Available: https://arxiv.org/abs/2406.12045
[6]
G. Mialon, C. Fourrier, C. Swift, et al., “GAIA: A benchmark for general AI assistants.” 2023. Available: https://arxiv.org/abs/2311.12983
[7]
UK AI Security Institute, “Inspect: A framework for large language model evaluations.” Accessed: Nov. 10, 2026. [Online]. Available: https://inspect.aisi.org.uk/
[8]
Confident AI, “DeepEval: The LLM evaluation framework.” Accessed: Nov. 10, 2026. [Online]. Available: https://github.com/confident-ai/deepeval
[9]
OpenTelemetry Authors, “OpenTelemetry semantic conventions for generative AI.” Accessed: Nov. 10, 2026. [Online]. Available: https://github.com/open-telemetry/semantic-conventions-genai
[10]
Model Context Protocol contributors, “Model context protocol specification, version 2025-06-18.” Accessed: Nov. 10, 2026. [Online]. Available: https://modelcontextprotocol.io/specification/2025-06-18