Retrieval-Augmented Code Generation: A Survey with Focus on Repository-Level Approaches

Yicheng Tao, Yao Qin, Yepang Liu
10/6/2025
cs.SEcs.CL

No confident code implementation found for this paper. 3 possible matches can be shown below.

Abstract

Recent advancements in large language models (LLMs) have substantially improved automated code generation. While function-level and file-level generation have achieved promising results, real-world software development typically requires reasoning across entire repositories. This gives rise to the challenging task of Repository-Level Code Generation (RLCG), where models must capture long-range dependencies, ensure global semantic consistency, and generate coherent code spanning multiple files or modules. To address these challenges, Retrieval-Augmented Generation (RAG) has emerged as a powerful paradigm that integrates external retrieval mechanisms with LLMs, enhancing context-awareness and scalability. In this survey, we provide a comprehensive review of research on Retrieval-Augmented Code Generation (RACG), with an emphasis on repository-level approaches. We categorize existing work along several dimensions, including generation strategies, retrieval modalities, model architectures, training paradigms, and evaluation protocols. Furthermore, we summarize widely used datasets and benchmarks, analyze current limitations, and outline key challenges and opportunities for future research. Our goal is to establish a unified analytical framework for understanding this rapidly evolving field and to inspire continued progress in AI-powered software engineering.

View on arXivView PDF

Code Implementations

No confident code match yet

We couldn't find an author-owned or strongly-evidenced community implementation for this paper. 3 weaker matches are hidden by default — verify before relying on them.

No code implementations found yet.

Know of an implementation? Let us know in the comments below!

Similar Papers

Cite this paper

@article{tao2025retrievalaugmented,
  title  = {Retrieval-Augmented Code Generation: A Survey with Focus on Repository-Level Approaches},
  author = {Yicheng Tao and Yao Qin and Yepang Liu},
  year   = {2025},
  eprint = {2510.04905},
  archivePrefix = {arXiv},
  url    = {http://arxiv.org/abs/2510.04905v2}
}

Add a badge to your README

Shows whether official code is linked for this paper.

Code of Paper badge
[![Code of Paper](https://codeofpaper.com/badge/2510.04905.svg)](https://codeofpaper.com/paper/2510.04905)

Discussion