How SWE-bench Turned Real GitHub Issues Into an AI Test

Its creators explain why the benchmark was easy to conceive, hard to run, and dependent on human judgment to keep scores meaningful.

CJCarlos Jimenezゲスト · AnthropicAWAlexander Wettigゲスト · Anthropic
チャンネル
Stanford Online
公開日
2026年11月30日
動画
1:22:20
読了時間
11 分
スライド
3
原文
英語
YouTube で開く
スクロールすると動画は右下に小さくなって再生を続けます。字幕は閲覧言語に合わせて切り替わります。
閲覧言語2 言語で読めます
この記事はまだ日本語に翻訳されていないため、英語の原文を表示しています。
要約

30 秒でわかる

SWE-bench began with a simple pairing: a real GitHub issue supplies the problem and its fixing pull request supplies tests and a human solution. Recreating old repositories and making those tests run took months, its creators say, even though the task was clear almost immediately. Their initial best model solved just 1.96%, but the benchmark then supported stronger agents and a broader community. For future evaluations, they recommend using agents to automate setup while keeping the source of verification clear and checking whether human reviewers agree with the metric.

  1. 1Issues and pull requests supplied natural problem–solution pairsThe team used real GitHub issues as tasks and human-authored fixes and tests as evaluation material. The pairing offered a scale and variety of expertise the researchers could not easily write themselves.
  2. 2A 1.96% initial score still gave the team a useful signalJimenez saw a nonzero result as evidence that models could engage with the tasks. Giving models the correct files improved their results, helping isolate part of the difficulty.
  3. 3Recreating historical environments took most of the manual workOld dependencies, test frameworks and ambiguous failures turned a simple task formulation into months of engineering. A missing dependency could make a test error unrelated to the quality of a model’s fix.
  4. 4Adoption required sustained maintenance after publicationThe team maintained leaderboards and evaluation infrastructure, fixed bugs and moved toward portable Docker environments. Their follow-through helped other groups actually run the benchmark.
  5. 5Coding-agent harnesses became lighter as models learned tool useEarly SWE-agent needed prompts and safeguards to steer chat models through a terminal. Jimenez says stronger models often require less scaffolding, though the useful boundary between model and tools keeps changing.
  6. 6Agents can build evaluations if people can inspect their workWettig recommends dashboards, logs and spot checks, including asking how errors were repaired. A fix that makes an environment run can still damage data quality.
  7. 7An evaluation score needs agreement with human judgmentsJimenez recommends looking at both passing and failing examples to see whether the metric captures the intended quality. Teams can also compare environments to measure and reduce variability.

ポイント

  1. Use real problems and independently produced human tests when they provide a meaningful evaluation signal.
  2. Inspect environment setup and test failures: a missing dependency can make a valid task impossible.
  3. A low nonzero baseline can still be useful if diagnostic experiments reveal what makes the task hard.
  4. Budget for maintenance, portability and community support after releasing a benchmark.
  5. When agents build evaluation data, collect logs, spot-check cases and investigate repairs that could compromise quality.
  6. Validate metrics against human judgments of both successful and failed outputs, rather than treating a score as self-explanatory.
全文

チャプターごとに整えた全文を読む

文字起こしのみ
01

A real coding task for longer-context models

The speakers revisit 2023 evaluations and explain why GitHub issues paired with pull requests offered a natural test. Early models performed poorly, easing but not eliminating concerns about memorization.

Carlos Jimenez, Alexander Wettig and John Yang worked on SWE-bench together at Princeton. Jimenez focused his doctoral research on evaluations; Wettig's work centered on pretraining and long-context models. Yang asks them to revisit how they turned real software issues into an evaluation of coding systems.

In spring and summer 2023, models with much longer context windows were beginning to appear. Wettig recalls that 100,000 tokens was considered long, while early SWE-bench baselines used a 32,000-token GPT-4 model. Many long-context tests felt artificial, and the team wondered what putting large files or whole repositories into a model's context might make possible.

Coding evaluations at the time often resembled short completion, correction or programming-competition problems. Most involved a single model response followed by evaluation, rather than an agent repeatedly interacting with tools. The researchers wanted a task grounded in actual software work.

A GitHub issue paired with the pull request that fixes it supplies a natural problem-and-solution pair, Jimenez explains. The repositories contain many such examples, dates and human-written fixes. It was a more ambitious task than a short coding puzzle, but the raw material was already public.

Collecting that material was laborious. The team had to gather issues and pull requests, connect the relevant pairs, and store repositories using academic computing infrastructure. They did not yet know whether models would solve any of the resulting tasks.

Wettig remembers worrying that models had already encountered these public historical problems and would simply reproduce the human fixes. The first models were poor at the tasks, and in his view later improvements came through approaches other than simply regurgitating solutions. He notes that any public benchmark can still be contaminated through training, deliberately or otherwise.

The GitHub API made the pairing less straightforward than a single lookup: the researchers first needed complete sets of issues and pull requests, then linked them. Wettig speculates that an easier-to-extract pairing might have made the data more likely to appear in model training, though that is a counterfactual rather than a measurement.

02

A low baseline and months of environment work

A roughly 2% starting score still gave the team useful signal. Building reproducible historical repositories and interpreting test failures proved much harder than sketching the benchmark.

The best reported initial score was 1.96%. Yang asks whether such a low baseline made the benchmark seem too difficult. Jimenez says roughly 2% was more encouraging than zero: it suggested that models could grasp some structure and gave researchers a starting point for improvement.

The expanding family of SWE evaluations and tools
スライド 1 / 3The expanding family of SWE evaluations and toolsThe timeline shows follow-on benchmarks, environments and agents built around software-engineering tasks.

To show the tasks were challenging rather than arbitrary, the paper included diagnostic analyses. Wettig describes giving a model the exact files known from the human patch to be relevant; the solve rate rose. A model trained on the task distribution, SWE-Llama, also benefited from that easier setting, which helped explain where the difficulty lay.

The group had discussed related ideas independently. Yang recalls finding a scikit-learn issue that fit the formulation, then the three mapped out the task on a whiteboard. The core idea came together quickly, but producing the benchmark took around three to four months.

Jimenez says the combination of dated problems and expert human pull requests made the structure clear quickly. He worried another group might publish the idea first. Most of the necessary work was turning those examples into usable environments where model-generated changes could be tested against human-written signals.

Wettig recalls Yang working through old repository dependencies and test frameworks. NumPy, for example, involved complicated C dependencies and historical versions that were difficult to install. A setup that worked for recent issues could fail on older pull requests.

There were also awkward edge cases in the test results. A test might fail because a dependency was missing, not because the proposed fix was wrong, so the team had to decide how to distinguish environmental errors from meaningful fail-to-pass and pass-to-pass behavior. Today, they say, coding agents can automate more of this setup; SWE-smith uses agents to help configure dependencies and tests.

Yang advises building at least the first task hands-on before automating the process. The group calls the difficult manual work 'trudging through mud': inspecting the actual data exposes long-tail problems in issues, pull requests and environments that are easy to miss from a high-level pipeline.

The team also spent time refining how it explained the benchmark. A hand-drawn diagram went through many iterations with feedback from their adviser. The final figure shows the relationship among a repository issue, a proposed code change and the tests used to evaluate it.

Issue, generated patch and unit-test outcomes
スライド 2 / 3Issue, generated patch and unit-test outcomesThe diagram shows how a repository issue and codebase become a proposed patch that is checked against tests.
03

Using tests written by open-source contributors

Existing pull requests supplied expertise and task variety beyond the researchers’ own reach. That breadth came with less control than a hand-authored, tightly curated benchmark.

For verification, SWE-bench drew tests from the original pull requests rather than writing every test itself. Wettig says this provided a breadth of problems and expertise the three researchers could not have authored alone, including parts of libraries outside their specialties. The original set was in Python, and later work extended the format to more languages.

There is a tradeoff. A benchmark with expert contributors can impose tighter standards and ask authors to clarify possible solutions; collecting tests from existing open-source contributions draws on far more people but does not give the benchmark team the same control over annotation. Wettig describes SWE-bench as a starting point that prompted further evaluation work, not a perfect benchmark.

Environment setup produced failures with unexpected causes. Yang recalls that a Conda installation path longer than 128 characters led to confusing failures. The researchers were also working on a cluster without root permissions, which added friction to recreating old software environments.

Diagnosing an environment path-length failure
スライド 3 / 3Diagnosing an environment path-length failureThe team’s messages trace a Conda installation failure to paths longer than 128 characters.

The original plan considered 10,000 questions, but the cost of running the evaluation influenced the final scale. Yang notes that evaluation spending and model costs have changed since then. The point was not merely to collect tasks: each one needed an environment in which a proposed patch could be tested.

04

A benchmark needs users and maintenance

Adoption grew after an initially quiet release. The team sustained it with portable infrastructure, leaderboards, bug fixes and follow-up work.

After the September 2023 release, adoption did not immediately reach its later scale. Yang says interest grew substantially after Cognition released Devin in March 2024. Jimenez recalls that some people recognized the potential of AI-driven coding early, even while broad attention took longer.

In hindsight, the combination of verifiable problems and large data sources is attractive for improving models. The group notes that some training approaches common later were not yet part of their original workflow. What seemed obvious afterward was less settled when they started.

Maintaining a benchmark after publication required substantial community work. Jimenez describes at least a year of open-source maintenance, fixing bugs, supporting the evaluation harness and maintaining leaderboards. Making the project portable and usable by others became part of its impact.

The team converted the infrastructure to more standard, portable tools such as Docker and worked with people across industry to make it runnable. Wettig says it is tempting to finish one project and jump immediately to the next, but this follow-through paid off.

05

From benchmark to coding-agent harness

SWE-agent added terminal interaction to the benchmark. Its early scaffolding was heavy, but models trained for tools eventually needed less guidance.

The projects developed in stages: SWE-bench defined the task, SWE-agent offered a more flexible baseline, and SWE-smith later focused on training data. Wettig describes that sequence as a way to first establish what to measure, then build a stronger system for the measurement, and only afterward concentrate on training.

The first SWE-bench baselines used retrieval to supply relevant context and test a model's ability to solve the problem. Later, SWE-agent added an interactive loop in which model outputs could be sent to a terminal and the resulting observations returned to the model. That loop and its environment required significant engineering at the time.

Early SWE-agent needed substantial prompting and safeguards because the models were trained mainly to converse with people, not operate a command line. If the model tried an invalid command, the harness might inject a correction. As models became better trained for tool use, Jimenez says a much lighter harness often became sufficient.

Yang gives a small example of the old friction: a quiet command could return no output, and the model might mistake silence for failure and repeat it. Some custom file-viewing and editing tools remain useful, while other behavior has moved into the model. The boundary between model capabilities and surrounding tools continues to change.

Wettig recommends examining agent trajectories rather than assuming that a model shares the human operator's context. A model can enter a new episode without information a developer takes for granted and spend many tool calls following a seemingly wrong but understandable path. Seeing the sequence can reveal what the setup failed to communicate.

06

Inspecting evaluations and choosing new targets

The speakers argue for looking closely at what models actually see. They consider tasks beyond code, including unfamiliar interactive environments and subtle human interaction.

The same care applies to evaluation itself. Wettig says teams sometimes take data or a test environment for granted when training a model; stepping through exactly what the model sees can reveal a missing dependency or another reason the task was impossible. Thorough inspection is a research habit, not merely a final check.

Wettig also points to the open-ended question that helped start the project: what becomes feasible with much longer context? It led to a benchmark that few people now primarily describe as a long-context evaluation. A broad capability question can lead to a research problem different from the one initially expected.

Yang asks what is worth measuring once popular coding benchmarks become saturated. Terminal-based tests have expanded beyond repository patches into varied tasks, including work using cloud tools or code for scientific problems. The open question is whether to keep extending that paradigm or evaluate very different kinds of interaction.

Wettig cites Claude playing Pokémon as an example that exposes different abilities: exploring an unfamiliar environment and acting in a digital world rather than editing a repository. He also sees less steady progress on subtle human interaction and says measuring that may need a form other than a simple problem, answer and verifier.

Jimenez looks for settings where human expertise already leaves a usable signal. SWE-bench linked human-written problems, fixes and tests, but required engineering to make those pieces executable. Similar work might connect other kinds of problems with human judgments or artifacts that can evaluate a model's output.

07

Using agents without losing the evaluation signal

Automation can reduce the cost of environment building, but dashboards and spot checks are needed to oversee it. Human tests and expert judgment remain important sources of validation.

Asked how they would build an evaluation with current coding agents, Jimenez distinguishes cheaper implementation from the source of evaluation signal. Agents could have made the original environment setup much easier, but he still regards high-quality human expertise as important. Generating problems and answers with models can work, he says, provided there is meaningful external verification or other additional work.

Wettig suggests asking an agent to find candidate issues and pull requests, then checking the evidence. During environment construction, a dashboard can collect agent reports in one place, let a researcher inspect individual logs and spot-check examples, and provide summaries of what is happening.

The researcher should also ask what errors occurred and how agents handled them. An automated repair that makes a setup run can still compromise the data. Interfaces that make it easy to inspect individual cases, alongside summaries, help keep a person aware of failures at scale.

Asked about complementary roles, Wettig compares an evaluation to a product manager's work of studying how a product behaves for users. A large volume of feedback must be distilled into the most important problems. A repeatable evaluation can then turn those priorities into a way to track model improvement.

Yang describes SWE-bench Verified as an example of organizing human expertise. OpenAI's Preparedness team coordinated annotators and rubrics alongside the researchers, producing the 500-task split widely reported. Beyond its size, Yang sees the work as checking whether a task tests something people actually care about.

08

What makes a metric trustworthy

A score must correspond to outcomes people regard as valid, and variability can be measured. The speakers discuss deliberate task design, personalization and harder interactive evaluations.

An audience member asks how to validate a verifier, especially for open-ended tasks or model-based judges. Jimenez says it is difficult to give a number authority: people need to inspect both positive and negative outputs and decide whether the metric agrees with their judgment. A benchmark score has a precise meaning inside its own test, but its significance outside that setting is not automatic.

For variability, Jimenez suggests comparing alternative environments and measuring which yields lower variance. Wettig adds that teams should know where their signal comes from and which parts introduce noise. Agents might handle environment setup where results are easy to check, while human tests or careful review provide the critical signal.

Wettig warns against improvising an evaluation entirely through an unstructured conversation with a model. A clear idea of the intended capability helps keep task design deliberate. He compares the process to designing an exam: there may be no single objective definition of a good question, yet people can still recognize flaws.

Asked what open question in 2026 might be as generative as long context was in 2023, Yang points to personalization. One version asks whether a repository maintainer needs a large general model or a smaller one heavily adapted to that particular codebase. He does not assume that fine-tuned small models are the only route to personalization.

Yang also connects personalization to user control: an agent that accesses email, finances and other services could be useful, but raises questions about autonomy and regulation. His interest is in personalization that empowers the user while keeping that person in control.

Jimenez suggests looking at what improved computer use might enable beyond simply operating a computer. He cautions that he may have missed relevant recent evaluations. Wettig adds that, if agents can reproduce an earlier project in a few days, a useful research question is what they can now accomplish over several weeks.

The final audience question asks how verification should change for subjective, personalized and multi-step interactions. The speakers describe these as distinct open problems: interactive evaluation is more ambitious than a fixed patch test, and personalization and subjective quality each bring their own challenges.

Jimenez suggests focusing a project on a particular capability while looking for well-structured data that contains a meaningful signal. The group also considers existing interactive settings as test beds that reveal some properties while leaving others unmeasured.

同じチャンネルの記事

1:11:12EN
Stanford Online· 2026年11月30日Why Neural Network Training Can Stay at the Edge of StabilitySuhas Kotha · Stanford UniversitySuhas Kotha explains self-stabilization, adaptive optimizers and why flatter solutions do not always generalize better.Deep Learningモデルと学習Mathematics+2
1:14:45EN
Stanford Online· 2026年11月29日Why Averaging Neural Networks Works Only in Some PlacesSuhas Kotha · Stanford UniversitySuhas Kotha uses model averaging, river valleys and saddle points to explain what training can—and cannot—tell us about a loss landscape.Deep Learningモデルと学習Mathematics+2
20:46EN
Stanford Online· 2026年11月28日Why momentum matters more at large batch sizesTatsunori Hashimoto · Stanford UniversityA Stanford optimization quiz shows why batch size changes momentum’s value and how learning rate and weight decay interact.モデルと学習Neural NetworksAI research
スライド 7 枚1:20:02EN
Stanford Online· 2026年11月28日John Yang: How to tell whether an AI judge is reliableJohn Yang · Stanford UniversityModel judges can grade open-ended work, but their own biases and consistency need testing against people.評価(Evals)AI agentsAI research
1:08:53EN
Stanford Online· 2026年11月27日How µP and Muon keep neural-network training stable as models widenTatsunori Hashimoto · Stanford UniversityStanford’s Tatsunori Hashimoto explains why scaling rules enable learning-rate transfer and how Muon boosts weak update directions.モデルと学習AI research
1:10:50EN
Stanford Online· 2026年11月27日Andrew Ng: Build Agents Fast, Then Learn From Their FailuresAndrew Ng, Diyi Yang, Fred · DeepLearning.AINg favors early prototypes and later rigorous evaluation; Diyi Yang challenges how much generated code can safely go unreviewed.エージェント工学評価(Evals)AI in Education+2