一句话:首次在工业代码库场景中对比 RAG 与微调两类领域适配方法对 LCM 代码补全的影响与权衡。
代码补全是工业开发中提升效率的重要手段。随着大代码模型(LCM)的发展,该领域取得显著进展。然而,开源代码库与工业代码库在编码模式和内部依赖等方面存在天然差异,因此在实际采用 LCM 时通常需要进行领域适配。检索增强生成(RAG)与微调是两种最主流的适配范式,但此前尚无研究探讨它们在工业场景中的取舍。本文针对基于 LCM 的工业代码补全任务,对 RAG 与微调进行对比研究,旨在系统分析两种范式在领域适配中的表现差异与权衡,为工业实践中的方法选择提供参考。摘要未进一步给出具体实验结论。
Code completion, a crucial practice in industrial settings, helps developers improve programming efficiency by automatically suggesting code snippets during development. With the emergence of Large Code Models (LCMs), this field has witnessed significant advancements. Due to the natural differences between open-source and industrial codebases, such as coding patterns and unique internal dependencies, it is a common practice for developers to conduct domain adaptation when adopting LCMs in industry. There exist multiple adaptation approaches, among which retrieval-augmented generation (RAG) and fine-tuning are the two most popular paradigms. However, no prior research has explored the trade-off of the two approaches in industrial scenarios.
@inproceedings{paperbot8946,
title = {RAG or Fine-tuning? A Comparative Study on LCMs-based Code Completion in Industry},
author = {Chaozheng Wang and Zezhou Yang and Shuzheng Gao and Cuiyun Gao and Ting Peng and Hailiang Huang and Yuetang Deng and Michael Lyu},
booktitle = {FSE},
year = {2025},
doi = {10.1145/3696630.3728535}
}