SWE-Together
收藏资源简介:
SWE-Together重建了真实用户-代理会话中的多轮循环,通过一个反应式用户模拟器重放每个会话,该模拟器会提出问题、新需求等,并保留原始用户的意图。它包括109个任务,每个任务包含首次用户消息和可重放的交互,在沙箱中运行。数据集支持可插拔的编码代理(如opencode、claude-code等),并报告正确性(代理判断)和用户纠正(用户需要推动代理的程度)等指标。
SWE-Together reconstructs multi-turn cycles in real user-agent conversations by replaying each session through a reactive user simulator. This simulator generates questions, new requirements, and other relevant utterances while preserving the original user’s intent. The dataset includes 109 tasks, each containing the initial user message and replayable interactions, all running in a sandboxed environment. It supports pluggable coding agents such as opencode, claude-code, etc., and reports metrics including correctness (as judged by the agent) and user correction (the degree to which users need to prompt or adjust the agent’s work).
数据集概述
SWE-Together 是一个用于评估编码智能体在交互式用户会话中表现的数据集。它通过重建真实用户与智能体的多轮交互,并使用一个反应式用户模拟器来复现原始会话中的询问、新需求等,从而保留原始用户的意图。
核心特性
- 任务规模:包含 109 个任务,每个任务由一条初始用户消息和一段可重放的交互组成,所有任务均在沙箱环境中运行。
- 可插拔编码智能体:支持多种智能体框架,包括 opencode, claude-code, codex, mini-swe-agent。
- 评估维度:
- 正确性 (Correctness):通过智能体裁判(agentic judge)进行评估。
- 用户纠正 (User Correction):衡量用户需要多大程度地将智能体拉回正轨。
数据格式
-
数据集托管于 Hugging Face,可通过以下方式加载(无需克隆仓库): python from datasets import load_dataset ds = load_dataset("yfwu/SWE-Together", split="test") # 包含109个任务规范
-
每行数据包含:指令、代码仓库、基础提交、评分目标、参考补丁、用户意图等。其中
docker_image指向预构建环境(位于 GHCR),task_id映射到本仓库的tasks/<task_id>/目录。
使用方法
-
安装与配置:
- 使用
uv sync创建虚拟环境,复制.env.example为.env并填入所需 API 密钥。 - 需要 E2B 账户(云端沙箱,支持100+并发)或本地 Docker 环境(使用
--env-type docker)。
- 使用
-
运行评估:
- 使用启动脚本
launch.py默认处于试运行模式,添加--execute参数实际执行。 - 分为两个阶段:
- 阶段 1(运行):智能体完成任务,结果保存在
trials/目录。 - 阶段 2(评判):对结果进行评分和聚合,输出到
results/目录。
- 阶段 1(运行):智能体完成任务,结果保存在
- 示例命令:
bash
预览完整运行
python launch.py canonical_full109.json运行并评分一个模型队列
python launch.py canonical_full109.json --stage run --models opencode_opus48 --execute python launch.py canonical_full109.json --stage judge --models opencode_opus48 --execute
- 使用启动脚本
任务机制
- 任务信息是逐步揭示的,而非一次性给出。智能体首先获取
instruction.md(第0轮),然后用户模拟器根据原始会话的跟进内容(如澄清、纠正、审查)进行交互。 - 每个任务包含:指令、用户模拟提示、基于基础提交的 Docker 环境、测试门套件、参考补丁及冻结的裁判评分标准。
评分体系
- 正确性:智能体裁判将每个任务分解为加权完整性目标,并对比智能体的补丁进行评分(公平处理接近正确的答案)。最终指标包括
pass@1、stable_pass_rate和pass²(阈值:judge_score ≥ 0.85)。 - 用户纠正:计算公式为
#correction + 0.2·nudge,基于每条消息的标签计算用户需要纠正智能体的程度。
相关资源
- 论文:arXiv 2606.29957
- 官方网站:togetherbench.com
- Hugging Face 数据集:yfwu/SWE-Together
- 许可证:Apache 2.0



