编码代理基准测试应匹配用户的任务流程

·

研究论文 · 2026/10/12

对编码智能体的评估通常力求尽可能真实。在我们的研究中,我们收集了 JetBrains IDE 中真实软件工程师的 4,782 个智能体会话,称为 Production Sessions。由于研究对象是交互式智能体,我们研究了至少包含三条用户消息的会话(占样本的 33%)。这些长会话与源自问题的基准任务在两方面不同:(i) 用户请求涵盖的任务类型范围更广——关于项目代码的问题、规划、审查、重构、执行——以及 (ii) 用户在整个会话中在类型之间切换。来自三个公共交互语料库的长会话样本表现出显著不同的任务流(会话长度、任务类型和类型间转换的分布),因此没有单一的交互分布是普遍真实的:基准应指定目标用例并根据其测量进行校准。我们提出了 SWE-TaskFlow,一种转换任何源自问题的基准的方法:它通过提示拆分和可验证的仓库问答,在保留已验证任务和测试的同时,将交互导向目标任务流,并使用 TaskFlow 对齐分数(TFAS)在生成的轨迹中进行选择。在 700 个 SWE-Bench Pro 任务的试点中,以多个步骤顺序解决任务大约使智能体成本翻倍,而解决率没有稳定变化:交互协议本身是评估的一个重要维度。

该研究基于真实工程师的交互数据,揭示了当前编码智能体基准与真实任务流之间的差距,并提出了可校准基准的方法,对评估交互式编码智能体具有重要参考价值。

The evaluation of coding agents generally strives to be as realistic as possible. In our study, we collect 4,782 agent sessions of real software engineers in JetBrains IDEs, which we call Production Sessions. Since our subject is interactive agents, we study the sessions with at least three user messages (33% of the sample). These long sessions differ from issue-derived benchmark tasks in two ways: (i) user requests span a far wider mix of task types - questions about the project's code, planning, review, refactoring, execution - and (ii) users switch between types throughout a session. Long-session samples from three public interaction corpora exhibit markedly different Task Flows (the distributions of session lengths, task types, and type-to-type transitions), so no single interaction distribution is universally realistic: benchmarks should name a target use case and calibrate to measurements from it. We present SWE-TaskFlow, an approach for transforming any issue-derived benchmark: it preserves the verified tasks and tests while steering the interaction toward a target Task Flow through prompt splitting and verifiable repository QA, with a TaskFlow Alignment Score (TFAS) for selecting among generated trajectories. In a pilot on 700 SWE-Bench Pro tasks, solving the task sequentially in several steps approximately doubles agent cost without a stable change in resolve rate: the interaction protocol itself is an important dimension of evaluation.

阅读原文

参与讨论