CodeRAG: Finding Relevant and Necessary Knowledge for Retrieval-Augmented Repository-Level Code Completion
On the map: Retrieval-augmented generation → RAG for code
Abstract (arXiv)
Repository-level code completion automatically predicts the unfinished code based on the broader information from the repository. Recent strides in Code Large Language Models (code LLMs) have spurred the development of repository-level code completion methods, yielding promising results. Nevertheless, they suffer from issues such as inappropriate query construction, single-path code retrieval, and misalignment between code retriever and code LLM. To address these problems, we introduce CodeRAG, a framework tailored to identify relevant and necessary knowledge for retrieval-augmented repository-level code completion. Its core components include log probability guided query construction, multi-path code retrieval, and preference-aligned BestFit reranking. Extensive experiments on benchmarks ReccEval and CCEval demonstrate that CodeRAG significantly and consistently outperforms state-of-the-art methods. The implementation of CodeRAG is available at https://github.com/KDEGroup/CodeRAG.
Key facts. Cited by 12 papers in the map (data through 7 Oct 2026). Placed in RAG for code, one of 15 directions in Retrieval-augmented generation. Builds on 15 of its 29 references that are in the map. First posted on arXiv 19 Sep 2025.
Builds on
15 of 29 references.
Closest ancestors · 1
Same direction, newest first
Other references · 14
- 2024RAPTOR: Recursive Abstractive Processing for Tree-Organized Retrievalcited by 519
- 2023RepoCoder: Repository-Level Code Completion Through Iterative Retrieval and Generationcited by 357
- 2022UniXcoder: Unified Cross-Modal Pre-training for Code Representationcited by 355
- 2023Enhancing Retrieval-Augmented Large Language Models with Iterative Retrieval-Generation Synergycited by 343
- 2023Large Language Models are Effective Text Rankers with Pairwise Ranking Promptingcited by 302
- 2023CrossCodeEval: A Diverse and Multilingual Benchmark for Cross-File Code Completioncited by 181
- 2022CoCoMIC: Code Completion By Jointly Modeling In-file and Cross-file Contextcited by 64
- 2019Pythia: AI-assisted Code Completion Systemcited by 54
- 2017Code Completion with Neural Attention and Pointer Networkscited by 49
- 2024Dataflow-Guided Retrieval Augmentation for Repository-Level Code Completioncited by 40
- 2024REPOFUSE: Repository-Level Code Completion with Fused Dual Contextcited by 32
- 2021Code Completion by Modeling Flattened Abstract Syntax Trees as Graphscited by 30
Built on by
Citing papers per year: 2025: 2; 2026: 10.
12 papers.
- 2025Retrieval-Augmented Code Generation: A Survey with Focus on Repository-Level Approachescited by 20
- 2025Beyond the Prompt: An Empirical Study of Cursor Rulescited by 7
- 2026Specification-Based Code-Text-Code Reengineering for LLM-Mediated Software Evolutioncited by 5
- 2026RepoShapley: Shapley-Enhanced Context Filtering for Repository-Level Code Completioncited by 3
- 2026A Study on the Impact of Fault localization Granularity for Repository-Scale Code Repair Taskscited by 1
- 2026An Empirical Study of Proactive Coding Assistants in Real-World Software Developmentcited by 1
- 2026When Retrieval Hurts Code Completion: A Diagnostic Study of Stale Repository Contextcited by 1
- 2026Library-Aware Doubles and Iterative Repair for Large Language Model-Generated Unit Tests in OpenSIL Firmwarecited by 0
- 2026Repository-Level Solidity Code Generation with Large Language Models: From Prompting to Fine-Tuningcited by 0
- 2026SemChunk-C: Semantic Segmentation for C Codecited by 0
- 2026ProjAgent: Procedural Similarity Retrieval for Repository-Level Code Generationcited by 0
- 2026SynH-Rank: Quality-Aware Code Search via Diverse Data Synthesis and Hierarchical Ranking Trainingcited by 0
- 2026SynH-Rank: Quality-Aware Code Search via Diverse Data Synthesis and Hierarchical Ranking Training19 Jul 2026
- 2026ProjAgent: Procedural Similarity Retrieval for Repository-Level Code Generation9 Jul 2026
- 2026Repository-Level Solidity Code Generation with Large Language Models: From Prompting to Fine-Tuning18 Jun 2026
- 2026Library-Aware Doubles and Iterative Repair for Large Language Model-Generated Unit Tests in OpenSIL Firmware18 Jun 2026
- 2026Specification-Based Code-Text-Code Reengineering for LLM-Mediated Software Evolution24 May 2026
- 2026When Retrieval Hurts Code Completion: A Diagnostic Study of Stale Repository Context14 May 2026
- 2026SemChunk-C: Semantic Segmentation for C Code12 May 2026
- 2026An Empirical Study of Proactive Coding Assistants in Real-World Software Development7 May 2026
- 2026A Study on the Impact of Fault localization Granularity for Repository-Scale Code Repair Tasks31 Mar 2026
- 2026RepoShapley: Shapley-Enhanced Context Filtering for Repository-Level Code Completion6 Jan 2026
- 2025Beyond the Prompt: An Empirical Study of Cursor Rules21 Dec 2025
- 2025Retrieval-Augmented Code Generation: A Survey with Focus on Repository-Level Approaches6 Oct 2025
Similar, not cited
Close in wording, no citation either way
- 2025SaraCoder: Orchestrating Semantic and Structural Cues for Resource-Optimized Repository-Level Code Completion
- 2024Repoformer: Selective Retrieval for Repository-Level Code Completion
- 2026Do Not Treat Code as Natural Language: Implications for Repository-Level Code Generation and Beyond
- 2026Better Call Grep: Evaluating and Improving Grep-Like Lexical Retrieval for Repository-Level Code Completion
- 2024A Lightweight Framework for Adaptive Retrieval In Code Completion With Critique Model
- 2025Impact-driven Context Filtering For Cross-file Code Completion
- 2024On The Importance of Reasoning for Context Retrieval in Repository-Level Code Editing
- 2024CodeRAG-Bench: Can Retrieval Augment Code Generation?