Coding Benchmark

What is SWE-bench?

SWE-bench is the definitive benchmark for testing AI models on real software engineering tasks. It uses actual GitHub issues to measure whether models can understand bugs, navigate codebases, and write working patches.

What Does SWE-bench Measure?

SWE-bench evaluates an AI model's ability to perform real software engineering work. Unlike coding challenges that test algorithms in isolation, SWE-bench asks models to solve actual problems from real open-source projects.

Each task in SWE-bench comes from a real GitHub issue in popular Python repositories like Django, Flask, NumPy, and Scikit-learn. The model receives:

  • The original issue description (bug report or feature request)
  • The complete codebase at the version where the issue occurred
  • Any relevant context from the repository

The model must then generate a code patch that fixes the issue and passes the project's existing test suite. This is exactly what human software engineers do every day.

Key Insight

SWE-bench is intentionally difficult. Reported results depend on the split, agent scaffold, tools, inference budget, and evaluation harness. That variability is a reason to inspect the setup before using a result to make a model-selection decision.

How SWE-bench Works

The benchmark was created by researchers at Princeton and Salesforce. Here's the methodology:

  1. Issue Collection: Pull requests from 12 popular Python repositories were analyzed to find those that fixed bugs or added features in response to GitHub issues.
  2. Task Creation: Each task includes the issue text, the codebase state before the fix, and the test cases that verify the fix works.
  3. Model Evaluation: The model is given the issue and codebase, then must generate a patch. The patch is applied and tests are run.
  4. Scoring: A task is only marked correct if all relevant tests pass. Partial credit is not given.

The SWE-bench Dataset Sizes

  • SWE-bench (Full): 2,294 tasks from 12 repositories. The original, complete dataset.
  • SWE-bench Verified: 500 tasks manually reviewed to ensure reliability. This is now the preferred subset for fair comparisons.

Where to Find Current SWE-bench Results

A static leaderboard ages quickly and can hide important differences in the agent scaffold and evaluation setup. For current, reproducible results, consult the official SWE-bench repositoryand its evaluation guidance. Before comparing models, confirm the split, tool access, inference budget, and harness are equivalent.

Use public results to form a shortlist, then run the same candidates against representative issues from your own codebase. That separates a strong benchmark run from a dependable fit for your engineering workflow.

Limitations and Criticisms

SWE-bench is valuable, but it's not a complete picture of coding ability. Important limitations:

  • Python only: All tasks are in Python. Performance may not transfer to other languages.
  • Bug-fix focus: Most tasks are bug fixes, not feature development or architecture work.
  • Test coverage: Some tasks have incomplete test suites, meaning a model might "pass" without truly solving the problem.
  • Context length: Models with larger context windows may have advantages that don't reflect real ability.
  • Contamination risk: Some models may have seen the test data during training, inflating scores.
Caution

Don't rely solely on SWE-bench for model selection. A model with a 45% score might be better for your specific use case than one with 55%, depending on your tech stack, task types, and budget.

When to Use SWE-bench for Model Selection

SWE-bench is most useful when:

  • You're building a coding assistant that works with existing codebases
  • You need models that can understand natural language bug reports
  • Your team works primarily in Python
  • You want a rough comparison of coding capabilities between models

It's less useful when:

  • You need models for greenfield development (new projects from scratch)
  • Your work involves languages other than Python
  • You're focused on code explanation or documentation rather than patches
  • You need to compare models on speed, cost, or reliability

For a more complete picture, combine SWE-bench with MMLU (reasoning),Chatbot Arena (human preference), and our owndaily operational benchmarks.

Related Benchmarks

Frequently Asked Questions

What is SWE-bench?

+

SWE-bench (Software Engineering Benchmark) is a dataset that tests AI models on real software engineering tasks. It contains actual bug reports and feature requests from popular open-source Python projects, along with the code changes that human developers made to fix them. Models must understand the problem, navigate a codebase, and generate correct patches.

What does a good SWE-bench score look like?

+

There is no universal “good” score. Results depend on the benchmark split, agent scaffold, tools, inference budget, and evaluation harness. Compare runs on the same SWE-bench split and setup, then validate finalists on representative issues from your own repositories. For current reproducible results and evaluation guidance, use the official SWE-bench repository and leaderboard rather than a static ranking.

How is SWE-bench different from other coding benchmarks?

+

Unlike benchmarks that test isolated functions or algorithmic puzzles, SWE-bench requires models to work with real codebases spanning thousands of lines, understand issue descriptions written by humans, and produce patches that pass existing test suites. It tests practical software engineering, not just code generation.

Should I use SWE-bench scores to choose a coding assistant?

+

SWE-bench is one useful signal, but it has limitations. It only tests Python, focuses on bug fixes rather than feature development, and may not reflect your specific use cases. Use it alongside other benchmarks and, ideally, test models on your own codebase before committing.

What is SWE-bench Verified?

+

SWE-bench Verified is a curated subset of 500 tasks from the original SWE-bench dataset. Human annotators reviewed each task to ensure the test suite is reliable and the task is solvable. Many leaderboard rankings now use this subset because it provides more consistent, fair comparisons between models.

See How Models Perform Today

Our daily scorecards test models on real tasks, not just benchmarks. Get current rankings for coding, reasoning, and tool use.

View Latest Scorecards