mlsanityData to 7 Oct 2026

CodeRAG: Finding Relevant and Necessary Knowledge for Retrieval-Augmented Repository-Level Code Completion

arXiv 2509.16112 ↗First posted 19 Sep 2025cs.CL cs.IR cs.SEcited by 12

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

  1. 2024GraphCoder: Enhancing Repository-Level Code Completion via Code Context Graph-based Retrieval and Language Model11 Jun

Other references · 14

  1. 2024RAPTOR: Recursive Abstractive Processing for Tree-Organized Retrievalcited by 519
  2. 2023RepoCoder: Repository-Level Code Completion Through Iterative Retrieval and Generationcited by 357
  3. 2022UniXcoder: Unified Cross-Modal Pre-training for Code Representationcited by 355
  4. 2023Enhancing Retrieval-Augmented Large Language Models with Iterative Retrieval-Generation Synergycited by 343
  5. 2023Large Language Models are Effective Text Rankers with Pairwise Ranking Promptingcited by 302
  6. 2023CrossCodeEval: A Diverse and Multilingual Benchmark for Cross-File Code Completioncited by 181
  7. 2022CoCoMIC: Code Completion By Jointly Modeling In-file and Cross-file Contextcited by 64
  8. 2019Pythia: AI-assisted Code Completion Systemcited by 54
  9. 2017Code Completion with Neural Attention and Pointer Networkscited by 49
  10. 2024Dataflow-Guided Retrieval Augmentation for Repository-Level Code Completioncited by 40
  11. 2024REPOFUSE: Repository-Level Code Completion with Fused Dual Contextcited by 32
  12. 2021Code Completion by Modeling Flattened Abstract Syntax Trees as Graphscited by 30
2 more
  1. 2024BIDER: Bridging Knowledge Inconsistency for Efficient Retrieval-Augmented LLMs via Key Supporting Evidencecited by 28
  2. 2023A Survey of Source Code Search: A 3-Dimensional Perspectivecited by 5

Built on by

Cited by year (2026 to 7 Oct)

Citing papers per year: 2025: 2; 2026: 10.

12 papers.

Similar, not cited

Close in wording, no citation either way

  1. 2025SaraCoder: Orchestrating Semantic and Structural Cues for Resource-Optimized Repository-Level Code Completion
  2. 2024Repoformer: Selective Retrieval for Repository-Level Code Completion
  3. 2026Do Not Treat Code as Natural Language: Implications for Repository-Level Code Generation and Beyond
  4. 2026Better Call Grep: Evaluating and Improving Grep-Like Lexical Retrieval for Repository-Level Code Completion
  5. 2024A Lightweight Framework for Adaptive Retrieval In Code Completion With Critique Model
  6. 2025Impact-driven Context Filtering For Cross-file Code Completion
  7. 2024On The Importance of Reasoning for Context Retrieval in Repository-Level Code Editing
  8. 2024CodeRAG-Bench: Can Retrieval Augment Code Generation?