Large Language Model (LLM) code agents increasingly resolve repository-level issues by iteratively editing code, invoking tools, and validating candidate patches. In these workflows, agents often write tests on the fly, a paradigm adopted by many high-ranking agents on the SWE-bench leaderboard. However, we observe that GPT-5.2, which writes almost no new tests, can even achieve performance comparable to top-ranking agents. This raises the critical question: whether such tests meaningfully improve issue resolution or merely mimic human testing practices while consuming a substantial interaction budget. To reveal the impact of agent-written tests, we present an empirical study that analyzes agent trajectories across six state-of-the-art LLMs on SWE-bench Verified. Our results show that while test writing is commonly adopted, but resolved and unresolved tasks within the same model exhibit similar test-writing frequencies Furthermore, these tests typically serve as observational feedback channels, where agents prefer value-revealing print statements significantly more than formal assertion-based checks. Based on these insights, we perform a controlled experiment by revising the prompts of four agents to either increase or reduce test writing. The results suggest that changes in the volume of agent-written tests do not significantly change final outcomes. Taken together, our study reveals that current test-writing practices may provide marginal utility in autonomous software engineering tasks.


翻译:大型语言模型(LLM)代码智能体正日益通过迭代编辑代码、调用工具和验证候选补丁来解决仓库级别的问题。在这些工作流程中,智能体通常会即时编写测试,这一范式已被SWE-bench排行榜上许多排名靠前的智能体所采用。然而,我们观察到几乎不编写新测试的GPT-5.2,其性能甚至可与顶级智能体相媲美。这引发了一个关键问题:此类测试是否能有效提升问题解决能力,抑或仅仅是在消耗大量交互预算的同时模仿人类测试实践。为揭示智能体编写测试的影响,我们开展了一项实证研究,分析了六种最先进LLM在SWE-bench Verified基准上的智能体执行轨迹。结果表明,尽管编写测试被普遍采用,但同一模型内已解决和未解决的任务却表现出相似的测试编写频率。此外,这些测试通常仅作为观察性反馈渠道,智能体明显更倾向于使用揭示变量值的打印语句,而非基于断言的正式检查。基于这些发现,我们通过修改四个智能体的提示词来增加或减少测试编写,进行了一项对照实验。结果显示,智能体编写测试数量的变化并未显著改变最终结果。综上所述,我们的研究表明,在当前的自主软件工程任务中,现有的测试编写实践可能仅提供有限的效用。

0
下载
关闭预览

相关内容

智能体,顾名思义,就是具有智能的实体,英文名是Agent。
智能体评判者(Agent-as-a-Judge)研究综述
专知会员服务
37+阅读 · 1月9日
LLM/智能体作为数据分析师:综述
专知会员服务
36+阅读 · 2025年9月30日
LLMs与生成式智能体模拟:复杂系统研究的新范式
专知会员服务
27+阅读 · 2025年6月15日
基于大语言模型的智能体优化研究综述
专知会员服务
59+阅读 · 2025年3月25日
可信赖LLM智能体的研究综述:威胁与应对措施
专知会员服务
36+阅读 · 2025年3月17日
智能体检索增强生成:关于智能体RAG的综述
专知会员服务
89+阅读 · 2025年1月21日
揭示生成式人工智能 / 大型语言模型(LLMs)的军事潜力
专知会员服务
31+阅读 · 2024年9月26日
基于大型语言模型的软件工程智能体综述
专知会员服务
58+阅读 · 2024年9月6日
【综述】多智能体强化学习算法理论研究
深度强化学习实验室
15+阅读 · 2020年9月9日
多智能体强化学习(MARL)近年研究概览
PaperWeekly
38+阅读 · 2020年3月15日
GitHub超9千星:一个API调用27个NLP预训练模型
新智元
17+阅读 · 2019年7月22日
国家自然科学基金
4+阅读 · 2017年12月31日
国家自然科学基金
18+阅读 · 2017年12月31日
国家自然科学基金
0+阅读 · 2015年12月31日
国家自然科学基金
0+阅读 · 2015年12月31日
国家自然科学基金
0+阅读 · 2014年12月31日
国家自然科学基金
0+阅读 · 2014年12月31日
国家自然科学基金
0+阅读 · 2014年12月31日
国家自然科学基金
0+阅读 · 2014年12月31日
国家自然科学基金
18+阅读 · 2009年12月31日
Measuring Agents in Production
Arxiv
0+阅读 · 2月3日
VIP会员
相关VIP内容
智能体评判者(Agent-as-a-Judge)研究综述
专知会员服务
37+阅读 · 1月9日
LLM/智能体作为数据分析师:综述
专知会员服务
36+阅读 · 2025年9月30日
LLMs与生成式智能体模拟:复杂系统研究的新范式
专知会员服务
27+阅读 · 2025年6月15日
基于大语言模型的智能体优化研究综述
专知会员服务
59+阅读 · 2025年3月25日
可信赖LLM智能体的研究综述:威胁与应对措施
专知会员服务
36+阅读 · 2025年3月17日
智能体检索增强生成:关于智能体RAG的综述
专知会员服务
89+阅读 · 2025年1月21日
揭示生成式人工智能 / 大型语言模型(LLMs)的军事潜力
专知会员服务
31+阅读 · 2024年9月26日
基于大型语言模型的软件工程智能体综述
专知会员服务
58+阅读 · 2024年9月6日
相关基金
国家自然科学基金
4+阅读 · 2017年12月31日
国家自然科学基金
18+阅读 · 2017年12月31日
国家自然科学基金
0+阅读 · 2015年12月31日
国家自然科学基金
0+阅读 · 2015年12月31日
国家自然科学基金
0+阅读 · 2014年12月31日
国家自然科学基金
0+阅读 · 2014年12月31日
国家自然科学基金
0+阅读 · 2014年12月31日
国家自然科学基金
0+阅读 · 2014年12月31日
国家自然科学基金
18+阅读 · 2009年12月31日
Top
微信扫码咨询专知VIP会员