RepoFuse: A Dual-Context Approach to Repository-Level Code Completion at Industrial Scale
Repository-level code completion requires understanding complex cross-file dependencies, yet existing approaches struggle to balance context richness with the sub-200ms latency requirements of real-time IDE integration. We present RepoFuse, a dual-context framework deployed at Ant Group1 serving 10,000 developers across 50+ million lines of code. In a production deployment at Ant Group, RepoFuse maintained an average latency of 156ms and improved completion acceptance rate by 18%. This was accomplished through systematic categorization of cross-file context into semantic context (structural dependencies via lightweight static analysis) and similar context (functionally analogous patterns via similarity search), combined with a relevance-guided selection algorithm that optimizes the efficiency-accuracy trade-off. Benchmark evaluation on CrossCodeEval demonstrates 4.26 and 3.01 improvements in exact match scores for Python and Java respectively, while using only 25% of baseline token requirements. More significantly, our one-week A/B test with 80,000 completion requests revealed that developers particularly valued the dual-context approach when working across microservice boundaries, with 73% reporting reduced context switching between files. The system successfully operates under production constraints with distributed caching, real-time graph updates, and p95 latency under 190ms, demonstrating that principled context categorization enables practical repository-level completion at industrial scale.We have open-sourced RepoFuse at GitHub.
Wed 8 JulDisplayed time zone: Eastern Time (US & Canada) change
10:30 - 12:30 | Repo-Level Code GenerationResearch Papers / Ideas, Visions and Reflections / Industry Papers at MB 3.210 Chair(s): Zhijie Wang Concordia University | ||
10:30 20mTalk | RealBench: A Repo-Level Code Generation Benchmark Aligned with Real-World Software Development Practices Research Papers Jia Li Wuhan University, Hongyi Deng Peking University, Yiran Zhang Nanyang Technological University, Kechi Zhang Peking University, China, Tianqi Shao Peking University, Tiankuo Zhao Wuhan University, Weinan Wang Peking University, Zhi Jin Wuhan University, Ge Li Peking University, Yang Liu Nanyang Technological University, Yingtao Fang Wuhan University, Yihong Dong Peking University | ||
10:50 20mTalk | Do Not Treat Code as Natural Language: Implications for Repository-Level Code Generation and Beyond Research Papers Minh Le-Anh FPT Software AI Center, Huyen Nguyen Hanoi University of Science and Technology, Khanh An Tran Hanoi University of Science and Technology, Nam Le Hai Hanoi University of Science and Technology, Linh Ngo Van Hanoi University of Science and Technology, Nghi D. Q. Bui Google Research, Xuan-Bach D. Le University of Melbourne DOI Pre-print | ||
11:10 20mTalk | One Size Does Not Fit All: Revisiting Code Context Engineering for Repository-Level Code Generation Research Papers Yichen LI ByteDance, Qiye Lin Harbin Institute of Technology, Shenzhen, Yun Peng The Chinese University of Hong Kong, Zhihan Jiang The Chinese University of Hong Kong, Jinyang Liu Chinese University of Hong Kong, Chaozheng Wang The Chinese University of Hong Kong, Yintong Huo Singapore Management University, Singapore, Cuiyun Gao Harbin Institute of Technology, Shenzhen | ||
11:30 10mTalk | LLM-Assisted Repository-Level Generation with Structured Spec-Driven Engineering Ideas, Visions and Reflections Shuzhao Feng McGill University, Boqi Chen University of Ottawa, Brett Meyer McGill University, Gunter Mussbacher McGill University Link to publication DOI | ||
11:40 20mTalk | In Line with Context: Repository-Level Code Generation via Context Inlining Research Papers Chao Hu Shanghai Jiao Tong University, Wenhao Zeng Shanghai Jiao Tong University, Yuling Shi Shanghai Jiao Tong University, Beijun Shen Shanghai Jiao Tong University, Xiaodong Gu Shanghai Jiao Tong University Pre-print | ||
12:00 20mTalk | RepoFuse: A Dual-Context Approach to Repository-Level Code Completion at Industrial Scale Industry Papers Ming Liang Ant Group, Xiaoheng Xie Ant Group, Gehao Zhang Ant Group, Xunjin Zheng Ant Group, Wei Jiang Ant Group, Chengpeng Wang National University of Singapore, Gang Fan Huawei Hong Kong Research Centre, Peng Di Kunlunxin & UNSW Sydney | ||