# SWE-bench (2023)

> Turned 2,294 real GitHub issues into tasks where a model must patch the repository so that the project's own tests pass.

Page: https://mralbu.github.io/ai-datasets/p/swe-bench

## Key facts

- Title: SWE-bench: Can Language Models Resolve Real-World GitHub Issues?
- Authors: Carlos E. Jimenez, John Yang, Alexander Wettig, Shunyu Yao, Kexin Pei, Ofir Press, Karthik Narasimhan
- Venue: ICLR 2024
- Category: LLMs
- Paper: https://www.alphaxiv.org/abs/2310.06770

## Why it matters

It moved coding evaluation from self-contained puzzles to real repositories, and its near-zero scores invited the agent systems that followed. Its human-checked subset, SWE-bench Verified (2024), became the headline number for coding agents, and the same recipe was reused for more languages and harder sets.

## The idea

Take merged pull requests from 12 popular Python projects that close an issue and add tests. Keep those whose tests fail before the fix and pass after it, and that install and run cleanly. The model sees the issue text and the whole repository at the commit before the fix, writes a patch, and is graded by the hidden tests, which must start passing while the old ones keep passing.

## The result

Given files picked by BM25 retrieval, the best model, Claude 2, resolved 1.96% of issues; GPT-4 resolved 1.3%. Even when handed exactly the files the real fix edited, Claude 2 reached only 4.8%. Longer contexts made models worse at finding what to change, and their patches were less than half the length of the developers'.

## The data

- [SWE-bench (2023)](https://mralbu.github.io/ai-datasets/d/swe-bench.md): 2,294 GitHub issues from 12 Python projects; a fix counts only if the project's tests pass.

## Builds on

- [Codex (2021)](https://mralbu.github.io/ai-datasets/p/codex.md)

## Led to

- [Agentless (2024)](https://mralbu.github.io/ai-datasets/p/agentless.md)
- [SWE-agent (2024)](https://mralbu.github.io/ai-datasets/p/swe-agent.md)
- [SWE-bench Pro (2025)](https://mralbu.github.io/ai-datasets/p/swe-bench-pro.md)
- [Terminal-Bench (2026)](https://mralbu.github.io/ai-datasets/p/terminal-bench.md)

## Part of

- [Coding agents](https://mralbu.github.io/ai-datasets/t/coding-agents.md) (step 3 of 8)
