arXivDaily arXiv每日学术速递 周一至周五更新
arXiv 2606.13449cs.SEcs.AI
收藏

面向指令即代码:理解指令文件对智能体拉取请求的影响

Toward Instructions-as-Code: Understanding the Impact of Instruction Files on Agentic Pull Requests

École de Technologie Supérieure

Ali Arabat, Mohammed Sayagh

AI总结:

通过分析148个项目的15549个智能体PR,发现指令文件对合并率、代码变更量和合并工作量无一致正面影响,但成功项目指令文件更长且结构更清晰,提出“指令即代码”研究方向。

摘要:

AI智能体(如GitHub Copilot)作为队友协作完成不同的软件工程任务,包括通过拉取请求(Agentic-PRs)提出的代码生成。为了提高智能体效率,开发者创建指令文件来指导AI智能体,包括如何导航项目、定位正确组件、运行测试、遵守最佳实践等。本文研究了这些指令的创建与AI智能体在创建更好的拉取请求方面的性能之间的关系,这些拉取请求具有更高的成功机会(即合并率)、处理更复杂的任务(例如代码变更量),并且需要更少的合并工作量(例如合并时间)。为此,我们分析了来自AIDev数据集中148个项目的15,549个智能体PR。使用这三个维度,我们比较了每个项目在创建指令文件前后的情况。我们发现,为AI智能体指定指令并不一定会带来更好的结果。使用指令文件后,27.7%的项目的合并率至少提高了20%,而26.35%的项目合并率下降。在变更量(例如代码变更量、修改文件数量)和合并智能体PR的工作量(例如合并时间和评论数量)方面也观察到相同的情况。通过初步探索,我们发现成功提高合并率的项目具有更长的指令文件,并且这些文件结构良好,分为更多的章节和子章节。我们的结果激励了研究需求,以帮助从业者将指令文件的开发视为一项软件工程活动(即,\textbf{指令即代码})。

英文摘要:

AI-agents (e.g., GitHub Copilot) collaborate as teammates in different software engineering tasks, including code generation proposed through pull requests (Agentic-PRs). For better agent efficiency, developers create instruction files that guide the AI-agents, including how to navigate the project, locate the right components, run tests, respect best practices, and more. In this paper, we investigate the relationship between the creation of these instructions and the performance of AI-agents in creating better pull requests, which have a higher chance of success (i.e., the merge rate), address more complex tasks (e.g., code churn), and require less effort to be merged (e.g., time to merge). To this end, we analyze 15,549 agentic PRs from 148 projects in the AIDev dataset. Using the three dimensions, we compare each project before and after the creation of the instruction files. We find that specifying instructions for AI-agents does not necessarily lead to better results. With the instruction files, 27.7\% of the projects increased their merge rate by at least 20\%, while 26.35\% decreased it. The same observation is seen with the amount of changes (e.g., code churn, number of modified files) and with the efforts to merge an agentic PR (e.g., merge time and number of comments). From a first exploration, we find that projects that managed to increase their merge rate have substantially longer instruction files, which are also well structured into a higher number of sections and sub-sections. Our results motivate the need for research to assist practitioners in framing the development of instruction files as a software engineering activity (aka, \textbf{Instructions-as-Code}).

机构、总结、中文摘要均由AI分析而来,可能存在错误,请以论文正文为准。

↑