CodeCompose:AI輔助程式碼撰寫的大規模工業部署
CodeCompose: A Large-Scale Industrial Deployment of AI-assisted Code Authoring
May 20, 2023
作者: Vijayaraghavan Murali, Chandra Maddila, Imad Ahmad, Michael Bolin, Daniel Cheng, Negar Ghorbani, Renuka Fernandez, Nachiappan Nagappan
cs.AI
摘要
大型語言模型(LLMs)的崛起已經解鎖了這項技術在軟體開發中的各種應用。特別是,生成式LLMs已被證明可以有效地驅動基於人工智慧的程式碼編寫工具,這些工具在編寫程式碼時可以建議整個陳述或程式碼區塊。在本文中,我們介紹了CodeCompose,這是一個在Meta內部開發和部署的人工智慧輔助程式碼編寫工具。CodeCompose基於InCoder LLM,將生成能力與雙向性結合在一起。我們已經擴展了CodeCompose,以服務Meta的數以萬計的開發人員,涵蓋10多種程式語言和多個編碼界面。
我們討論了在大規模工業環境中部署此類工具時出現的用戶體驗和指標方面的獨特挑戰。我們分享了在為CodeCompose做出模型和系統架構設計決策時應對這些挑戰的經驗。最後,我們呈現了從CodeCompose的大規模部署中獲得的指標,顯示其在Meta內部程式碼編寫體驗中在15天的時間窗口內產生的450萬個建議的影響。定量指標顯示(i)CodeCompose在多種語言中的接受率為22%,以及(ii)CodeCompose使用者輸入的程式碼中有8%是通過接受CodeCompose的程式碼建議而輸入的。定性反饋表明,對於CodeCompose,有壓倒性的91.5%正面接受度。除了協助編寫程式碼外,CodeCompose還帶來其他積極的副作用,例如鼓勵開發人員生成更多內部文件、幫助他們發現新的API等。
English
The rise of large language models (LLMs) has unlocked various applications of
this technology in software development. In particular, generative LLMs have
been shown to effectively power AI-based code authoring tools that can suggest
entire statements or blocks of code during code authoring. In this paper we
present CodeCompose, an AI-assisted code authoring tool developed and deployed
at Meta internally. CodeCompose is based on the InCoder LLM that merges
generative capabilities with bi-directionality. We have scaled up CodeCompose
to serve tens of thousands of developers at Meta, across 10+ programming
languages and several coding surfaces.
We discuss unique challenges in terms of user experience and metrics that
arise when deploying such tools in large-scale industrial settings. We present
our experience in making design decisions about the model and system
architecture for CodeCompose that addresses these challenges. Finally, we
present metrics from our large-scale deployment of CodeCompose that shows its
impact on Meta's internal code authoring experience over a 15-day time window,
where 4.5 million suggestions were made by CodeCompose. Quantitative metrics
reveal that (i) CodeCompose has an acceptance rate of 22% across several
languages, and (ii) 8% of the code typed by users of CodeCompose is through
accepting code suggestions from CodeCompose. Qualitative feedback indicates an
overwhelming 91.5% positive reception for CodeCompose. In addition to assisting
with code authoring, CodeCompose is also introducing other positive side
effects such as encouraging developers to generate more in-code documentation,
helping them with the discovery of new APIs, etc.