多行AI辅助代码编写
Multi-line AI-assisted Code Authoring
AI总结:
本文介绍Meta的CodeCompose从单行到多行AI代码建议的扩展,通过优化延迟和解决突兀效应,使多行建议占接受字符42%,击键节省翻倍至17%,并已全面部署。
摘要:
CodeCompose是一个由大型语言模型(LLMs)驱动的AI辅助代码编写工具,为Meta的数十万开发者提供内联建议。在本文中,我们介绍了如何将该产品从显示单行建议扩展到多行建议。这一演进要求我们克服多个独特挑战,以提高这些建议对开发者的可用性。首先,我们讨论了多行建议可能产生的“突兀”效应,因为LLM的建议会不断移动开发者现有代码,否则会导致生产力和满意度下降。其次,多行建议的生成时间显著更长;因此,我们介绍了几项创新投资,以减少用户的感知延迟。这些模型托管优化将多行建议的延迟加快了2.5倍。最后,我们对数万名工程师进行了实验,以了解多行建议如何影响用户体验,并与单行建议进行对比。我们的实验揭示:(i)多行建议占接受总字符数的42%(尽管仅占显示建议的16%),(ii)多行建议几乎将用户节省的击键百分比从9%翻倍至17%。多行CodeCompose已部署给Meta的所有工程师,且选择退出多行建议的工程师不到1%。
英文摘要:
CodeCompose is an AI-assisted code authoring tool powered by large language models (LLMs) that provides inline suggestions to 10's of thousands of developers at Meta. In this paper, we present how we scaled the product from displaying single-line suggestions to multi-line suggestions. This evolution required us to overcome several unique challenges in improving the usability of these suggestions for developers. First, we discuss how multi-line suggestions can have a 'jarring' effect, as the LLM's suggestions constantly move around the developer's existing code, which would otherwise result in decreased productivity and satisfaction. Second, multi-line suggestions take significantly longer to generate; hence we present several innovative investments we made to reduce the perceived latency for users. These model-hosting optimizations sped up multi-line suggestion latency by 2.5x. Finally, we conduct experiments on 10's of thousands of engineers to understand how multi-line suggestions impact the user experience and contrast this with single-line suggestions. Our experiments reveal that (i) multi-line suggestions account for 42% of total characters accepted (despite only accounting for 16% for displayed suggestions) (ii) multi-line suggestions almost doubled the percentage of keystrokes saved for users from 9% to 17%. Multi-line CodeCompose has been rolled out to all engineers at Meta, and less than 1% of engineers have opted out of multi-line suggestions.
机构、总结、中文摘要均由AI分析而来,可能存在错误,请以论文正文为准。