Benchmark · agentic
SWE-rebench
SWE-rebench 是编程基准 SWE-bench 的持续更新版本,它从近期的 GitHub issue 中抽取任务,以降低模型在训练时已经见过这些任务的可能性。它报告模型解决的软件工程任务的百分比(% resolved)。
了解更多
- 示例
- 一个典型任务会给模型一份来自某个 GitHub 仓库的真实缺陷报告或功能请求,模型必须修改项目代码来解决该问题。
- 评分方式
- 指标是 % resolved:模型修复的任务数除以任务总数,以百分比表示。
- 验证方式
- 当仓库自带的测试套件在修改后的代码上通过时,解决方案即被自动接受——修复必须让原本失败的测试变绿,同时不破坏其他测试。
- 为何重要
- 由于任务不断从近期 issue 中更新,它能更真实地反映实际编程能力,也更难通过记忆旧的公开基准数据来刷高分。
示例解析
任务
基于 GitHub 上真实 Python 仓库(
python-slugify)构建的 SWE-rebench 实例,固定在某个基准 commit 上。问题:slugify('Hello, World!') 返回 'hello--world'——连续的分隔符产生了双连字符而非单个,但预期的 slug 是 'hello-world'。交付物:针对该仓库快照的 git-diff 补丁,使 FAIL_TO_PASS 测试通过,同时所有 PASS_TO_PASS 测试保持通过。解答
--- a/slugify/slugify.py
+++ b/slugify/slugify.py
@@ def slugify(text):
text = re.sub(r"[^\w\s-]", "", text).strip().lower()
- return re.sub(r"[\s]+", "-", text)
+ text = re.sub(r"[\s]+", "-", text)
+ return re.sub(r"-{2,}", "-", text)
解析
slug 生成器把空白折叠成
-,却从不去重重复的连字符,因此多个分隔符会漏出来;加上 re.sub(r'-{2,}', '-', text) 可将它们归一为单个 -。SWE-rebench 以执行结果评分:在仓库容器中应用补丁,只有当 FAIL_TO_PASS 测试现在通过且所有 PASS_TO_PASS 测试仍通过时,该实例才算解决(排行榜 = 解决率百分比)。| 日期 | 模型 | 得分 | 来源 |
|---|---|---|---|
| 2026-07-05 | Claude Opus 4.8 xhigh | 56.5% | SWE-rebench排行榜新增GLM-5.2、Qwen3.6、Gemma 4并优化界面 |
| 2026-07-05 | GLM-5.2 | 51.1% | SWE-rebench排行榜新增GLM-5.2、Qwen3.6、Gemma 4并优化界面 |
| 2026-07-05 | Gemini 3.5 Flash | 49.5% | SWE-rebench排行榜新增GLM-5.2、Qwen3.6、Gemma 4并优化界面 |
| 2026-07-05 | MiniMax M3 | 45.6% | SWE-rebench排行榜新增GLM-5.2、Qwen3.6、Gemma 4并优化界面 |
| 2026-07-05 | DeepSeek-V4 Pro | 42.7% | SWE-rebench排行榜新增GLM-5.2、Qwen3.6、Gemma 4并优化界面 |
| 2026-07-05 | MiMo V2.5 Pro | 42.4% | SWE-rebench排行榜新增GLM-5.2、Qwen3.6、Gemma 4并优化界面 |
| 2026-07-05 | DeepSeek-V4 Flash | 38.4% | SWE-rebench排行榜新增GLM-5.2、Qwen3.6、Gemma 4并优化界面 |
| 2026-07-05 | Qwen3.6-27B | 36.5% | SWE-rebench排行榜新增GLM-5.2、Qwen3.6、Gemma 4并优化界面 |
| 2026-07-05 | Qwen3.6-35B-A3B | 33.8% | SWE-rebench排行榜新增GLM-5.2、Qwen3.6、Gemma 4并优化界面 |
| 2026-07-05 | Gemma 4 31B | 16.5% | SWE-rebench排行榜新增GLM-5.2、Qwen3.6、Gemma 4并优化界面 |
| 2026-02-01 | MiniMax M2.5 | 39.6% | 去污染基准测试揭示顶级AI编程模型之间存在12分差距 |
| 2026-02-01 | Claude Opus 4.6 | 51.7% | 去污染基准测试揭示顶级AI编程模型之间存在12分差距 |