# RAG for code

Area: [Retrieval-augmented generation](https://mlsanity.com/rag/index.md). HTML: https://mlsanity.com/rag/rag-for-code/

## Key facts

- RAG for code: 109 papers on arXiv since 2020 (data through 7 Oct 2026).
- 30 of its 109 mapped papers (28%) cite “Retrieval Augmented Code Generation and Summarization” (2021, arXiv 2108.11601).
- 24 of its 109 mapped papers (22%) cite “ReACC: A Retrieval-Augmented Code Completion Framework” (2022, arXiv 2203.07722).

## Most cited here

- [Retrieval Augmented Code Generation and Summarization](https://mlsanity.com/paper/2108.11601/) (2021), cited by 30 papers here
- [ReACC: A Retrieval-Augmented Code Completion Framework](https://mlsanity.com/paper/2203.07722/) (2022), cited by 24 papers here
- [Repoformer: Selective Retrieval for Repository-Level Code Completion](https://mlsanity.com/paper/2403.10059/) (2024), cited by 14 papers here
- [CodeRAG-Bench: Can Retrieval Augment Code Generation?](https://mlsanity.com/paper/2406.14497/) (2024), cited by 11 papers here
- [RAP-Gen: Retrieval-Augmented Patch Generation with CodeT5 for Automatic Program Repair](https://mlsanity.com/paper/2309.06057/) (2023), cited by 10 papers here
- [EVOR: Evolving Retrieval for Code Generation](https://mlsanity.com/paper/2402.12317/) (2024), cited by 9 papers here
- [GraphCoder: Enhancing Repository-Level Code Completion via Code Context Graph-based Retrieval and Language Model](https://mlsanity.com/paper/2406.07003/) (2024), cited by 9 papers here
- [Retrieval-Augmented Generation for Code Summarization via Hybrid GNN](https://mlsanity.com/paper/2006.05405/) (2020), cited by 8 papers here
- [FT2Ra: A Fine-Tuning-Inspired Approach to Retrieval-Augmented Code Completion](https://mlsanity.com/paper/2404.01554/) (2024), cited by 6 papers here
- [An Empirical Study of Retrieval-Augmented Code Generation: Challenges and Opportunities](https://mlsanity.com/paper/2501.13742/) (2025), cited by 6 papers here
