ChatPaper.aiChatPaper

複数行AI支援型コード作成

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は、大規模言語モデル(LLM)を活用したAI支援型コード作成ツールであり、Meta社内の数万人の開発者に対してインラインでの提案を提供しています。本論文では、このプロダクトを単一行の提案から複数行の提案へとスケールアップする過程を紹介します。この進化には、開発者にとっての提案の使いやすさを向上させるために、いくつかの独自の課題を克服する必要がありました。 まず、複数行の提案が「違和感」を引き起こす可能性について議論します。LLMの提案が開発者の既存のコードを常に移動させるため、これが生産性や満足度の低下を招く可能性があります。 次に、複数行の提案は生成に大幅に時間がかかるため、ユーザーが感じる待ち時間を短縮するためのいくつかの革新的な投資について紹介します。これらのモデルホスティングの最適化により、複数行提案の待ち時間が2.5倍速くなりました。 最後に、数万人のエンジニアを対象に実験を行い、複数行の提案がユーザーエクスペリエンスにどのような影響を与えるかを理解し、これを単一行の提案と比較します。実験結果から、(i) 複数行の提案が表示される提案の16%しか占めていないにもかかわらず、受け入れられた総文字数の42%を占めること、(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