ChatPaper.aiChatPaper

多行人工智慧輔助程式碼撰寫

Multi-line AI-assisted Code Authoring

February 6, 2024
作者: Omer Dunay, Daniel Cheng, Adam Tait, Parth Thakkar, Peter C Rigby, Andy Chiu, Imad Ahmad, Arun Ganesan, Chandra Maddila, Vijayaraghavan Murali, Ali Tayyebi, Nachiappan Nagappan
cs.AI

摘要

CodeCompose 是一款由大型語言模型(LLMs)驅動的人工智慧輔助程式碼編寫工具,為 Meta 的數以萬計開發人員提供即時建議。本文介紹了我們如何將產品從顯示單行建議擴展至多行建議。這個演進過程需要我們克服一些獨特挑戰,以提升這些建議對開發人員的可用性。 首先,我們討論了多行建議可能會產生「突兀」效應,因為語言模型的建議不斷在開發人員現有程式碼周圍移動,否則將導致生產力和滿意度降低。 其次,生成多行建議需要顯著較長的時間;因此,我們提出了幾項創新投資,以減少用戶感知的延遲。這些模型主機優化將多行建議的延遲加速了2.5倍。 最後,我們對數以萬計的工程師進行實驗,以了解多行建議如何影響用戶體驗,並將其與單行建議進行對比。我們的實驗顯示,(i)多行建議佔已接受總字符的 42%(儘管僅佔顯示建議的 16%)(ii)多行建議將用戶節省的按鍵次數比例從 9% 增加到 17%。多行 CodeCompose 已推廣至 Meta 的所有工程師,不到 1% 的工程師選擇退出多行建議。
English
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.
PDF102December 15, 2024