arXivDaily arXiv每日学术速递 周一至周五更新
arXiv 2504.20196cs.SEcs.AIcs.HC
收藏

理解并支持开发者在实践中如何提示LLM赋能的代码编辑

Understanding and supporting how developers prompt for LLM-powered code editing in practice

University of California Irvine(加州大学尔布雷分校);Google(谷歌);Meta

Daye Nam, Ahmed Omran, Ambar Murillo, Saksham Thakur, Abner Araujo, Marcel Blistein, Alexander Frömmgen, Vincent Hellendoorn, Satish Chandra

AI总结:

本文研究开发者在使用LLM赋能代码编辑工具时的提示行为,发现频繁重新提示表明使用困难,并提出AutoPrompter工具通过推断缺失信息提升编辑正确性27%。

摘要:

大型语言模型(LLM)正在迅速改变软件工程,嵌入在IDE中的编码助手正变得越来越普遍。尽管研究重点在于改进工具和理解开发者观点,但一个关键的空白在于理解开发者如何在日常工作中实际使用这些工具,尤其是他们在哪里遇到困难。本文通过一个多阶段的研究来填补这一空白,探讨开发者在Google广泛使用的IDE中与LLM赋能的代码编辑功能Transform Code的交互。首先,我们分析了该功能的 telemetry 日志,发现频繁重新提示可能是开发者在使用Transform Code时遇到困难的指标。其次,我们对不满意的请求进行了定性分析,确定了五个关键类别,这些类别经常缺少于开发者提示中。最后,基于这些发现,我们提出了并评估了一个工具AutoPrompter,该工具通过从周围代码上下文中推断缺失信息来自动改进提示,从而在我们的测试集上实现了27%的编辑正确性提升。

英文摘要:

Large Language Models (LLMs) are rapidly transforming software engineering, with coding assistants embedded in an IDE becoming increasingly prevalent. While research has focused on improving the tools and understanding developer perceptions, a critical gap exists in understanding how developers actually use these tools in their daily workflows, and, crucially, where they struggle. This paper addresses part of this gap through a multi-phased investigation of developer interactions with an LLM-powered code editing feature, Transform Code, in an IDE widely used at Google. First, we analyze telemetry logs of the feature usage, revealing that frequent re-prompting can be an indicator of developer struggles with using Transform Code. Second, we conduct a qualitative analysis of unsatisfactory requests, identifying five key categories of information often missing from developer prompts. Finally, based on these findings, we propose and evaluate a tool, AutoPrompter, for automatically improving prompts by inferring missing information from the surrounding code context, leading to a 27% improvement in edit correctness on our test set.

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

↑