opensourceprojects.dev

A broadsheet for software that doesn't ask for your email

SWE-bench: a benchmark for resolving real GitHub issues with language models
GitHub RepoImpressions2

Project Description

View on GitHub

SWE-bench: Testing Whether Language Models Can Actually Fix Your Code

You've probably watched a language model write a function from scratch and thought, "okay, impressive." Now hand it a real GitHub issue from a codebase it's never seen—a messy bug report with three comments, a linked pull request, and no clear reproduction steps—and see what happens. That's the gap SWE-bench was built to measure, and it's a much harder problem than autocomplete.

What It Does

SWE-bench is a benchmark for evaluating large language models on real-world software issues collected from GitHub. The setup is straightforward: given a codebase and an issue, a language model has to generate a patch that resolves the described problem. No hand-holding, no synthetic toy problems—actual issues pulled from actual repositories.

The project provides both code and data, and it's tied to two published works: the original SWE-bench paper (ICLR 2024, oral presentation) and SWE-bench Multimodal (ICLR 2025), which extends the benchmark into visual software domains. It's written in Python (3.8+) and released under an MIT license.

Evaluation runs inside Docker containers, which the team moved to in mid-2024 for more reproducible results. You can also run evaluations entirely on the cloud through Modal, or use sb-cli, a cloud-based tool for submitting runs to the SWE-bench leaderboards.

Loading the dataset is about as simple as it gets:

from datasets import load_dataset
swebench = load_dataset('princeton-nlp/SWE-bench', split='test')

Why It's Cool

  • It grades on the hard part. Anyone can benchmark a model on LeetCode-style puzzles. SWE-bench asks whether a model can navigate an unfamiliar codebase, understand an issue written by a human, and produce a patch that actually works. That's closer to what you'd want an AI coding assistant to do in practice.

  • SWE-bench Verified is a smart check on the benchmark itself. In collaboration with OpenAI's Preparedness team, the project released a subset of 500 problems that real software engineers have confirmed are solvable. That's a meaningful detail—it filters out tasks that might be ambiguous or outright impossible, so you're measuring capability rather than noise.

  • The Docker pivot matters for reproducibility. Moving to a fully containerized evaluation harness means your results should be comparable to everyone else's. Benchmarks live or die on this, and it's the kind of unglamorous infrastructure work that makes a project trustworthy.

  • Multimodal v2 is fully open source. As of September 2026, SWE-bench Multimodal v2 ships with 480 tasks available for local evaluation. If you're curious whether models generalize to visual software domains, you can run that yourself rather than taking a leaderboard's word for it.

  • There's a reference implementation. The team released SWE-agent, which set the state of the art on the full SWE-bench test set. It's useful to see what a serious attempt at this benchmark looks like, not just the scoring rubric.

How to Try It

  1. Start with the documentation—it's the canonical entry point and links to the setup guides.

  2. Install Docker. SWE-bench uses it for reproducible evaluations, so follow the Docker setup guide for your platform. On Linux, check the post-installation steps too.

  3. Grab the dataset:

from datasets import load_dataset
swebench = load_dataset('princeton-nlp/SWE-bench', split='test')
  1. If you'd rather not manage containers locally, look into the Modal integration for running evaluations entirely on the cloud, or use sb-cli to submit runs to the leaderboards.

  2. For the multimodal track, check the website and the dataset on Hugging Face.

The full repository is at github.com/swe-bench/swe-bench.

Final Thoughts

SWE-bench is best suited for researchers, evaluation engineers, and anyone building or assessing coding agents who needs a grounded measure of real-world performance. It won't tell you whether a model is pleasant to pair-program with, and it's not a product—it's infrastructure for answering a specific question honestly. If that question matters to you, the documentation and the Docker harness are both in good shape. Worth a look.

Back to Projects
Project ID: 66238fb3-37ee-4f13-b76a-f4233e92c3b4Last updated: September 23, 2026 at 02:48 AM