测试发现代码助手用仓库上下文文件效果不升反增成本
Evaluating AGENTS.md: Are Repository-Level Context Files Helpful for Coding Agents?
- 用LLM生成或开发者提交的上下文文件提升任务成功率
- 上下文文件使推理成本平均增加20%以上,但成功率未提升
- 仅规范性指令有用,仓库概览类内容无实际帮助
软件开发中广泛使用AGENTS.md等上下文文件为代码助手定制仓库环境。尽管开发者强烈推荐,但目前尚无严谨研究验证其有效性。本文在两类场景下评估代码助手性能:基于流行仓库的SWE-bench任务(使用LLM生成的上下文文件)和包含开发者提交上下文文件的新型问题集。结果表明,提供上下文文件并未普遍提高任务成功率,反而使推理成本平均增加20%以上。该现象在不同LLM、代码助手及上下文文件来源(自动生成或人工编写)中均成立。具体发现:代码助手能准确遵循上下文中的指令,但仓库概览类信息虽被推荐却无实际助益。结论:上下文文件仅对规范非标准编码实践有用,任何性能优化都应在部署前进行严格评估。
原文摘要 · Abstract (English)
A widespread practice in software development is to tailor coding agents to repositories using context files, such as AGENTS.md. Although this practice is strongly encouraged by agent developers, there is currently no rigorous investigation into whether such context files are actually effective for real-world tasks. In this work, we study this question and evaluate coding agents' task completion performance in two complementary settings: established SWE-bench tasks from popular repositories, with LLM-generated context files, and a novel collection of issues from repositories containing developer-committed context files. Surprisingly, we find that providing context files does not generally improve task success rates, while increasing inference cost by over 20% on average. This observation holds across different LLMs, coding agents, and for both LLM-generated and developer-committed context files. Specifically, we find that while instructions in the context files are well followed by coding agents, repository overviews, although popular and recommended by model providers, are not helpful. We conclude that while context files are useful for specifying non-standard coding practices, any attempts to improve performance should be rigorously evaluated before deployment.
Thank you to arXiv for use of its open access interoperability. PaperDance 不是 arXiv 官方产品;中文卡片由大模型生成,请以原文为准。