paperbot · PL 论文追踪

全部论文 待读 收藏

P2 RepoGenix: Dual Context-Aided Repository-Level Code Completion with Language Models

RepoGenix:基于语言模型的双上下文辅助仓库级代码补全
ASE Proceedings of the 39th IEEE/ACM International Conference on Automated Software Engineering2024匹配度 3/10 · 论文关注仓库级代码补全中的双上下文选择与提示压缩,属于 LLM 辅助软件开发,且有工业落地;但核心并非静态分析、形式化验证、浮点程序分析或贝叶斯程序分析,也未涉及 Agentic 程序的静态分析或 LLM 与这些分析方向的交叉。引用 4 inbox
Ming Liang, Xiaoheng Xie, Gehao Zhang, Xunjin Zheng, Peng Di, Wei Jiang, Hongwei Chen, Chengpeng Wang, Gang Fan
crossref: 2026-09-12

AI 速览

一句话:RepoGenix 通过相似与相关双上下文的感知选择压缩提示,在不增加延迟的前提下提升仓库级代码补全性能。

仓库级代码补全利用整个代码库的上下文来提升预测准确率,但更全面的上下文也带来更高的推理延迟,如何在精度与计算效率之间取得平衡是实际应用中的关键难题。本文提出 RepoGenix,一种不增加延迟即可增强仓库级代码补全的方案:它同时引入相似上下文(analogous context)与相关上下文(relevant context),并借助 Context-Aware Selection 技术将这两类上下文高效压缩为有限长度的提示,从而在有限预算内保留最有价值的信息。作者在 CrossCodeEval 上进行实验,结果显示 RepoGenix 不仅将推理时间大幅减少 48.41%,性能还优于基线方法。该方案已在蚂蚁集团的开发环境中实现并验证,并正在扩展到多种编程语言且计划开源,以提升更广泛开发者社区的代码补全效率。

问题
仓库级代码补全虽能借助整个代码库上下文提升准确率,但完整上下文显著增加推理延迟,精度与效率难以兼顾。
方法
RepoGenix 融合相似上下文与相关上下文,并采用 Context-Aware Selection 技术将二者压缩为有限大小的提示以控制推理开销。
评估
在 CrossCodeEval 基准上对比基线方法,测量推理时间与补全性能;并在蚂蚁集团开发环境中实际部署验证。
原文摘要(Abstract)

The success of language models in code assistance has spurred the proposal of repository-level code completion as a means to enhance prediction accuracy, utilizing the context from the entire codebase. However, this comprehensive context comes at a cost: while it enhances model performance, it also increases inference latency. This balance between improved accuracy and computational efficiency poses a significant challenge in real-world applications. We present RepoGenix, a solution that enhances repository-level code completion without increased latency. RepoGenix combines analogous context and relevant context, using Context-Aware Selection technology to efficiently compress these contexts into limited-size prompts. Our experiments on CrossCodeEval demonstrate that RepoGenix not only achieves a substantial 48.41% reduction in inference time, but also yields improvement in performance compared to baseline methods. We have successfully implemented and tested RepoGenix within AntGroup's development environments. This approach is being extended to multiple programming languages and will be open-sourced, aiming to enhance code completion efficiency for the broader developer community.

链接与引用

DOI 原文 · PDF(开放获取) ·

BibTeX
@inproceedings{paperbot8299,
  title = {RepoGenix: Dual Context-Aided Repository-Level Code Completion with Language Models},
  author = {Ming Liang and Xiaoheng Xie and Gehao Zhang and Xunjin Zheng and Peng Di and Wei Jiang and Hongwei Chen and Chengpeng Wang and Gang Fan},
  booktitle = {ASE},
  year = {2024},
  doi = {10.1145/3691620.3695331}
}