Research map / Large language models / Retrieval and knowledge
CodeRAG: Finding Relevant and Necessary Knowledge for Retrieval-Augmented Repository-Level Code Completion
Sheng Zhang, Yifan Ding, Shuquan Lian, Shun Song, Hui Li
Xiamen University · Ant Group
Read the paperPlace an idea next to itCheck your own paper ↗
10measured effects
6improved
1no clear effect
3hurt
AI-extracted. The measured effects below were read by AI from the paper's full text (no summary yet). Numbers and claims can be wrong or missing context, so check the paper before you cite or build on it.
Measured effects reported in the paper
| What was changed | Where | Measured | Effect |
|---|---|---|---|
| use CodeRAG instead of best baseline DraCo | Qwen2.5-Coder-7B · ReccEval (100%) | code match EM: 39.99 -> 47.48 | Improved |
| use CodeRAG instead of DraCo | CodeGen-350M · ReccEval (100%) | code match EM: 23.96 (RepoCoder, best baseline) -> 26.81 | Improved |
| add LLM reranker to multi-path retrieval (ablation) | CodeRAG · ReccEval (100%) | code match EM (SantaCoder-1.1B): 27.70 -> 36.17 | Improved |
| add sparse retrieval to dataflow retrieval (ablation) | CodeRAG · ReccEval (100%) | code match EM (Qwen2.5-Coder-7B): 41.86 -> 44.21 | Improved |
| use distilled reranker instead of LLM reranker (ablation) | CodeRAG · ReccEval (30%) | code match EM (CodeGen-350M): 27.73 -> 23.58 | Hurt |
| use proposed query construction instead of last 1 line (ablation) | CodeRAG sparse · ReccEval (100%) | code match EM (Qwen2.5-Coder-7B): 32.08 -> 35.01 | Improved |
| use RepoFormer-3B with only left context | RepoFormer-3B · ReccEval | code match EM: 12.88 | Hurt |
| increase retained reranked pieces u from 5 to 10 (ablation) | CodeRAG · ReccEval (100%) | EM/ES | No clear effect |
| increase retained reranked pieces u from 1 to 3 (ablation) | CodeRAG · ReccEval (100%) | EM/ES | Improved |
| use CodeRAG instead of DraCo (efficiency) | CodeRAG · ReccEval query cost | seconds per query: 0.04 -> 0.23 | Hurt |
Open problems in RAG robustness and evaluation
When does retrieval help a language model, and when does it mislead it?
- Only one answer-bearing document is handled. · 6 papers state it
- String-match metrics misjudge long or rephrased answers. · 6 papers state it
- Verbalized graph triples distort or drop facts. · 5 papers state it
Closest papers by meaning
- Repoformer: Selective Retrieval for Repository-Level Code Completion (ICML 2024 · similarity 0.93)
- Late Code Chunking: A Code Chunking Strategy for Repository-Level Code Completion (ACL 2026 · similarity 0.93)
- AIRCoder: Adaptive Integration of Multi-dimensional Retrieval for Repository-level Code Completion (ACL 2026 · similarity 0.92)
- RepoCoder: Repository-Level Code Completion Through Iterative Retrieval and Generation (EMNLP 2023 · similarity 0.92)
- Hierarchical Context Pruning: Optimizing Real-World Code Completion with Repository-Level Pretrained Code LLMs (AAAI 2025 · similarity 0.90)
- RepoBench: Benchmarking Repository-Level Code Auto-Completion Systems (ICLR 2024 · similarity 0.89)
Writing a paper in this area? scime draft is a free LaTeX editor with AI included, real-time co-authors and a check of your references and venue rules before you submit. It also imports OpenAI Prism projects.