John Yang: An Agent Benchmark Must Measure More Than a Score

The task, harness and evaluation rules all change the result; harder tests also need to stay realistic and reproducible.

JYJohn YangSpeaker · Stanford University
Channel
Stanford Online
Published
Nov 26, 2026
Video
1:21:11
Read
12 min
Slides
9
Original
English
Open on YouTube
Scroll to read and the video shrinks to the bottom-right corner. Captions follow your reading language.
Reading languageAvailable in 2 languages
You're reading the original English.
SUMMARY

In 30 seconds

An AI agent’s benchmark score depends on more than the model: its tools, attempt limits, stopping rules and scoring method can change the outcome. Stanford instructor and SWE-bench co-creator John Yang separates the task itself from the protocol used to run it, and shows why both must be reported for meaningful comparisons. He contrasts fixed tests with competitions, explains how customer-service evaluations can check database changes, and warns that optimizing one public score can harm other behavior. A useful benchmark should be challenging without losing realism and resist contamination as models improve.

  1. 1Head-to-head tests can remain useful after a fixed exam saturatesChatbot Arena compares anonymous responses and derives relative ratings from human preferences. A mastered static test can still serve as a regression check.
  2. 2Optimizing a score can damage behavior outside the benchmarkYang describes how concentrating training on coding issues may improve a coding score while weakening instruction-following or other tasks.
  3. 3The task and the evaluation protocol are separate design choicesA benchmark defines the request, environment and verification, but also must state the harness and conditions under which agents are run.
  4. 4The same model can score differently with another harnessYang says designers may require a fixed scaffold or allow different ones. In either case the reported setup matters.
  5. 5A customer-service agent can be checked against the database stateτ-bench evaluates interactions with a simulated customer and checks whether the underlying records reach the intended outcome.
  6. 6A harder benchmark is not automatically a more realistic oneYang lists difficulty, realism, discrimination, usability, verification, interpretability and durability as qualities that can conflict.
  7. 7Public benchmark answers can enter training dataPrivate test splits, newly authored tasks and frequently refreshed examples are different ways to reduce contamination over time.

Takeaways

  1. Report the agent harness, tool access, budgets, attempts, stopping rules and aggregation alongside its score.
  2. Check whether success means a correct answer, a changed environment, a graded outcome or a win against another agent.
  3. Inspect failures before choosing whether to change training, the surrounding system or an unrealistic test.
  4. Make tasks challenging and discriminative without drifting away from the real work they are supposed to represent.
  5. Use private or refreshed tests and robust checks to reduce contamination and shortcuts; keep results and trajectories easy to inspect.
FULL TEXT

Read the edited text by chapter

Transcript only
01

From model training to measuring capability

Evaluation asks what improved, on which tasks and by what measure. Agent behavior matters as well as the outcome.

We have spent two lectures on the data used to improve agents. Now we need to ask what improvement means: which tasks have become easier, how we measure success, and whether an agent achieves that success in the intended way rather than exploiting a shortcut.

A benchmark is a measurement system, not a concept unique to language models. We will trace how language-model evaluations developed, then examine what makes an agent benchmark different and what properties make one useful.

02

From language tasks to exam suites

Early language tests led to broad benchmark suites and increasingly difficult questions. Evaluation instructions affect how scores can be compared.

During pre-training, a language model learns to predict the next token from a distribution of possibilities. This can teach structure from a large collection of text, but next-token prediction does not directly correspond to most tasks people encounter in daily life.

Language understanding research had benchmarks before today’s models. Researchers tested grammar, named entities, spam classification and ambiguous words: does ‘bat’ refer to an animal or sports equipment in this sentence? These tasks probed capabilities beyond predicting the next token.

SQuAD is an early question-answering example. The model receives a passage, such as a Wikipedia excerpt, and a question whose answer is in the passage. Can it identify the year the Golden Gate Bridge opened from that context?

Researchers once built separate systems for different language tasks. A significant shift was to recast many tasks as the same pattern: provide a prompt and generate a response. That let researchers use a single model across a wide collection of language-understanding problems.

Benchmarks such as GLUE, SuperGLUE and MMLU gathered different tasks into broader suites. Instead of reporting isolated results, researchers could measure performance across a range of domains. As models were fine-tuned for dialogue, chat evaluations also became important.

Safety evaluations ask a different kind of question: not merely whether a model is capable of answering, but whether it behaves appropriately when a request calls for refusal. Exam, chat and safety benchmarks supply background for understanding agent evaluations.

Exam-style benchmarks resemble standardized tests. Early builders could assemble questions from online textbooks and progressively harder math contests. As models improved, researchers looked for questions that required more specialized reasoning.

MMLU’s multiple-choice format affects difficulty: with four options, random guessing gives a 25% baseline. Open-ended answers have different properties. MMLU-Pro is an example of a harder collection designed as existing models improved.

The instructions for running an evaluation matter as much as the questions. A model allowed a reasoning scratchpad and a token budget may perform differently from one told to give an immediate answer. Benchmark builders need defensible instructions that let others compare like with like.

As benchmarks move from school-level questions to problems requiring expert knowledge, suitable questions become harder to collect from the web. Builders may need domain experts and human annotators to create difficult new questions deliberately.

03

Compare chat responses and safety behavior

Blind human preferences produce relative rankings, while model judges use rubrics. Safety tests evaluate behavior as well as capability.

Exams do not capture all of the ways people use language models. Instruction-following and chat benchmarks ask whether a model responds well to open-ended requests. AlpacaEval and Chatbot Arena illustrate two approaches to evaluating those responses.

Chatbot Arena presents two anonymous model responses to a prompt and asks a person to choose one, call them equal or judge both poor. The resulting head-to-head win rates can be combined into an Elo-style ranking; there need not be a single reference answer.

Comparing anonymous chatbot responses
SLIDE 1 / 9Comparing anonymous chatbot responsesChatbot Arena uses pairwise preferences to compare models without a single reference answer.

A fixed exam eventually saturates as models master its questions, after which it can still serve as a regression test. Relative competition is harder to saturate because performance depends on the strength of the opponents, which can change over time.

Human judgments cost money and effort. AlpacaEval instead uses a model with a rubric to compare responses. Yang says such a judge must itself be evaluated for consistency, reproducibility and agreement with people; the course returns to that question later.

Safety tests focus on behavior. The question is often whether the model refuses a clearly harmful request, rather than whether it knows the answer. There are also ambiguous cases, so a benchmark needs a representative range of requests and a clear account of the boundary it measures.

Yang imagines future systems in which authorization and context influence whether a capable model answers. For behavioral evaluation, ‘do not do bad things’ is not an operational specification; a broad task set must show what behavior the benchmark designer considers appropriate.

04

A benchmark score is not the whole objective

Failures can motivate changes to training, the surrounding system or the evaluation. Optimizing narrowly for a score may harm behavior elsewhere.

An audience member asks what to do after a poor benchmark result. Yang recommends inspecting the failures first. If the benchmark is trustworthy, options include changing training examples or modifying the system around the model, such as its instructions or the tools it can access.

A team could also reconsider the evaluation if the failing question is unrealistic. The choice depends on what the failure shows: changing model weights, changing the surrounding system and improving the test are different interventions.

Benchmarks provide common ground for research, help direct a field toward shared problems and give model providers a way to communicate capabilities. That shared language supports comparison, but the incentive to raise a public score also creates risks.

A model may be heavily optimized for one benchmark while behaving poorly elsewhere. Yang gives a hypothetical model that scores highly on software issues yet responds to a greeting as though the user had submitted a GitHub issue. A benchmark is a proxy, not the complete objective.

Asked how this happens, Yang points to a post-training distribution concentrated too heavily on one domain. A model trained extensively on coding traces may improve on coding tests while losing some instruction-following or browsing behavior.

He also describes the concern that a coding model could learn to wrap code in unnecessary exception handlers to suppress errors. Code may appear to run successfully while hiding the very failures that need to be fixed. Optimizing the reported outcome can alter behavior in unwanted ways.

05

Specify both the task and how the agent is run

An agent benchmark defines a request, environment and verification, as well as a protocol for the harness, budgets and model settings.

Agent benchmarks involve interaction over multiple turns: the model may call tools, search, gather information or change an environment before producing an outcome. That differs from a static question in which a model receives a prompt and returns a single answer.

Two components of an agent benchmark
SLIDE 2 / 9Two components of an agent benchmarkThe slide separates task formulation from the protocol used to run an agent.

Yang separates a benchmark into two major components. Task formulation specifies the request, available environment and verification. The evaluation protocol specifies how the agent system is run so that reported results can be interpreted and compared.

SWE-bench illustrates why the distinction matters. Its initial setup retrieved relevant files for an issue and asked the model to edit them. Later agentic systems placed a model in a terminal, where it could decide whether to inspect, edit or test first.

Comparisons also depend on sampling temperature, turn limits, cost budgets and the scaffold around the model. A fixed dollar budget gives differently priced models different amounts of work; a fixed turn limit answers a different question. Results need to state these choices.

06

Choose the environment and scoring rule

Tasks range from prescribed requests to competitions. Verification can be binary, graded, static or relative.

Problem statements range from highly specified to open-ended. A WebShop request can specify a product and price cap, while a software issue may state the defect without prescribing a patch. In competitive tasks, the objective may be to outperform another program rather than produce one fixed answer.

Task requests range from explicit to open-ended
SLIDE 3 / 9Task requests range from explicit to open-endedExamples show a progression from specified shopping criteria to a competitive coding objective.

The environment is another design choice. An agent might operate in a local terminal, a virtual machine, a simulated website or a live site. Live services introduce changing state and reproducibility or legal concerns; simulations trade some realism for control.

Robotics evaluations face a similar choice between a simulator and the physical world. Whatever environment a benchmark uses, its task should motivate interaction with the capabilities that environment is intended to test.

Four ways to score an agent
SLIDE 4 / 9Four ways to score an agentThe grid distinguishes binary and continuous scores, and static and relative comparisons.

Verification can be binary or graded, and static or relative. A unit test may return pass or fail. A performance-optimization task can instead give partial credit for speeding up code, while a competition can measure wins against other agents.

In Yang’s illustrative speedup example, a model achieves a 20-fold improvement and a human reference achieves 50-fold. A designer might require the full reference result or give a proportional score. This is a choice about what signal the benchmark should provide.

07

Harnesses, attempts and budgets affect reported scores

The same model may perform differently with a different harness. Stopping rules, number of attempts and aggregation need to be communicated.

A student asks how much the surrounding harness affects a model’s score. Yang says this is central to evaluation protocol: a minimal harness may offer only a shell command, whereas a richer system can expose different tools and workflows.

A benchmark designer may require one fixed harness for comparability or allow submissions with multiple harnesses. SWE-bench and Terminal-Bench leaderboards allow different ones, so the reported result should identify which harness accompanied the model.

Asked about reward hacking, Yang suggests monitoring submitted trajectories for suspicious ways of obtaining a high score, such as looking up a solution that the task was meant to test the agent’s ability to create. Reliable leaderboard comparisons require attention to how tasks were solved.

Protocol details can occupy little space in a paper but substantially affect the result. How many attempts are allowed? Are multiple runs averaged, or is the best result reported? One attempt can hide the variance in an agent’s performance.

What an evaluation protocol must specify
SLIDE 5 / 9What an evaluation protocol must specifyAttempts, stopping rules, model settings, harness access and result aggregation affect comparisons.

Stopping rules matter too. A task might take six hours, but the agent may finish earlier. Designers must decide how it signals completion and whether waiting for a training job or a busy compute cluster counts against the allotted time.

Model settings, tool access, time, cost and aggregation each affect what is being compared. There is no single universally correct configuration: the defensible choices differ between, for example, web and coding agents.

08

From text games to simulated customers

WebShop, WebArena and τ-bench show different choices about environments, users and outcome checks.

Early agents were evaluated in text games such as TextWorld and NetHack. The agent could navigate a text-described room and perform actions without needing to interpret screenshots. Even a simple game requires a sequence of actions rather than one static response.

ALFWorld connected text tasks to an embodied setting. It was not originally designed specifically for language-model agents; earlier systems combined visual understanding and language components. That history shows that useful environments may predate the agents now tested on them.

WebShop advanced website navigation beyond simple pages with a few buttons. Its simulated shopping site removed much of the complexity of real HTML and provided a text representation, giving early language models a way to search and select products.

WebArena broadened the range of simulated websites. Shopping, forums and maps require different databases, state and representations. Building these environments is part of the benchmark’s contribution, not just writing down the user requests.

A benchmark with no user interaction is convenient to run but may miss an important part of real work. A person using a coding agent can provide feedback along the way. Adding that interaction changes both the environment and what a system must do.

τ-bench makes the user central in customer-service scenarios such as changing or canceling a reservation. The agent interacts with a simulated user and a database, consulting relevant rules before taking actions.

Rather than score only what the assistant says, τ-bench checks the final database state. A request can require looking up a booking, checking a cancellation window and making the appropriate change. The verification follows the actual task outcome.

τ-bench checks a customer-service outcome
SLIDE 6 / 9τ-bench checks a customer-service outcomeThe agent works with a simulated user and tools, and grading checks the final database state.
09

Test terminals, full computers and competing code

Terminal-Bench broadens beyond repository issues, OSWorld exercises multiple applications, and CodeClash compares agents against opponents.

Terminal-Bench generalizes beyond GitHub issue repair. SWE-bench uses repository issues and tests for code patches; terminal tasks can use checks to verify a much wider range of actions and resulting states.

Their construction pipelines differ. SWE-bench can draw issues and pull requests from GitHub at scale, while Terminal-Bench initially relied on expert-authored tasks. Paying people to write tasks limits throughput, motivating work on more scalable environment creation.

OSWorld expands computer use beyond the browser. A useful task should actually require its broader environment: merely placing a repository issue in a virtual desktop does little if the agent can solve it entirely in a terminal.

A richer OSWorld task could involve files, a terminal and a browser: create a repository, check it and share it with another account. The point is to exercise the combination of applications a person might use on a computer.

Yang’s CodeClash explores competition as a way to make coding evaluation less prone to saturation. Agents write programs that compete over multiple rounds, receive results and refine their code, rather than merely attempting to pass a fixed set of tests.

Agents compete and refine code across rounds
SLIDE 7 / 9Agents compete and refine code across roundsCodeClash alternates program edits with competition and records outcomes for relative ratings.

For example, a poker bot might observe that an opponent plays loosely and adapt its strategy in a later round. Relative results can produce Elo ratings, although the chosen game still determines what kind of capability is being tested.

Other benchmarks test long sequences, cooperation or research tasks. BrowseComp asks questions requiring information from multiple pages; vending-machine simulations test management decisions; research-oriented benchmarks ask agents to perform work such as data preparation or model training.

10

Make benchmarks useful, interpretable and durable

Difficulty must be balanced with realism, ease of use and discrimination. Private or refreshed tests and robust grading can reduce contamination.

Yang offers seven desirable qualities for an agent benchmark: it should be challenging, natural, discriminative, easy to run, easy to verify, interpretable and durable. These goals can be in tension rather than increasing together automatically.

Seven qualities of a good benchmark
SLIDE 8 / 9Seven qualities of a good benchmarkThe lecture presents difficulty, realism, discrimination, usability, verification, interpretability and durability as related design goals.

Making a task harder does not necessarily make it realistic. Combining 200 software issues into one enormous task increases difficulty, but may no longer resemble the work users care about. A benchmark needs a reason for its difficulty, not just a high failure rate.

A static benchmark loses value as a frontier measure when most strong models solve nearly every task. It can remain useful for regression testing, but a new test is needed to distinguish further progress.

Yang applies the realism question to CodeClash itself: coding a better game-playing bot may be an interesting competition, but users still need a reason to believe it measures capabilities they care about elsewhere.

A discriminative benchmark separates systems. If all agents score zero or all score perfectly, the number says little about differences among them. Useful comparisons can point researchers toward specific behaviors, such as exploring a repository or reproducing a bug.

Ease of use matters because other people must run the benchmark repeatedly. Long instructions for downloading data, configuring databases and starting services can prevent iteration even if the underlying tasks are compelling.

Verification cost matters too. Yang recalls early SWE-bench evaluations with large test suites that were inconvenient and slow to run. A benchmark has to fit into researchers’ practical workflow; verification also needs to be reliable, not just fast.

Interpretability means making both the result and its underlying behavior accessible. A readable paper, repository and trajectory viewer can help another practitioner inspect failure modes and decide whether to improve the model or the system around it.

Durability includes resistance to contamination. Public GitHub issues and solutions may already appear in a model’s training data, so an apparently solved task may not demonstrate that the model produced the solution independently.

Ways to make evaluation more durable
SLIDE 9 / 9Ways to make evaluation more durablePrivate tests, refreshed tasks and stronger grading address different failure modes.

SWE-bench Pro uses a private test split; DeepSWE used experts to create new issues rather than simply crawl public ones. Fresh tasks can reduce contamination at release, though public examples may eventually become familiar as people optimize for them.

Other projects refresh their task sets with newer issues or programming problems created after a model’s training cutoff. Private tests, refreshed tasks and robust grading address different parts of the durability problem. The next lecture turns to language models as judges.

More from this channel

6 slides1:14:57EN
Stanford Online· Nov 25, 2026John Yang: Better Agent Training Starts With Choosing the Right DataJohn Yang · Stanford UniversityFilter tasks for reliable tests and useful difficulty; even successful agent runs can contain mistakes worth excluding.Data quality & curationAgent engineeringReinforcement Learning+2
30:50EN
Stanford Online· Nov 25, 2026Suhas Kotha: Measure Training Noise Before Trusting a Model ImprovementSuhas Kotha · Stanford UniversityIn a Stanford quiz review, small-model experiments show how random seeds, batch size and learning-rate schedules affect results.Models & trainingPretraining & midtrainingExperimentation+2
1:17:43EN
Stanford Online· Nov 24, 2026Tune the baseline before trusting a deep-learning resultTatsunori Hashimoto · Stanford UniversityTatsunori Hashimoto explains how hyperparameters, scaling, randomness and matched controls shape reliable experiments.Machine LearningScaling LawsDeep Learning+2
1:08:38EN
Stanford Online· Nov 24, 2026Stanford’s deep-learning course teaches students to predict experimentsTatsunori Hashimoto, Suhas Kotha · Stanford UniversityA small language model and repeated quizzes test intuition; one demonstration shows why a component can look broken until its learning rate is tuned.Deep LearningPretraining & midtrainingNeural Networks
3 slides1:24:37EN
Stanford Online· Nov 24, 2026Agents need practice environments as well as web textJohn Yang · Stanford UniversityJohn Yang explains how to collect trajectories and tasks, verify results and avoid training on shortcuts.AI agentsAgent engineeringData quality & curation+2
56:46EN
Stanford Online· Nov 23, 2026Amy X. Zhang: AI agents need shared plans and continual alignmentAmy X. Zhang · University of WashingtonResearch on cooperative work suggests better ways to divide tasks, notice agent activity and adjust to changing social preferences.Human-AI CollaborationAI agentsAI interface design+2