| 引用本文: | 张犬俊,谢杨,房春荣,虞圣呈,赵源,陈振宇.检索增强生成在软件工程中的应用综述.软件学报,2026,37(3):1316-1339 |
| |
|
| |
|
|
| 本文已被:浏览 2716次 下载 1378次 |
 码上扫一扫! |
|
|
| 检索增强生成在软件工程中的应用综述 |
|
张犬俊1,2, 谢杨1,2, 房春荣1,2, 虞圣呈1,2, 赵源1,2, 陈振宇1,2
|
|
1.计算机软件新技术全国重点实验室 (南京大学), 江苏 南京 210093;2.南京大学 软件学院, 江苏 南京 210093
|
|
| 摘要: |
| 检索增强生成(retrieval-augmented generation, RAG)通过融合信息检索与语言生成模型, 显著提升代码生成、补全、程序修复等软件工程下游任务的性能. 随着RAG在软件工程领域的迅速发展, 研究者难以全面掌握其最新的进展、面临的挑战及未来的潜在机遇. 为此, 系统性地综述2021–2024年间RAG在软件工程中的应用, 围绕RAG的核心架构及其在软件工程中的应用, 对108篇相关高质量研究进行汇总与深入分析. 首先, 探讨软件工程领域中RAG架构的关键组成部分, 详细总结检索器和生成器的通用分类, 并概述二者的集成方式. 其次, 重点分析RAG在各类软件工程下游任务中的应用, 包括代码生成、测试生成、程序修复等, 梳理其在不同任务场景下的实践方法与技术趋势. 最后, 讨论当前RAG应用所面临的挑战, 涉及知识库构建、检索和生成这3个阶段, 并探讨未来的研究方向与潜在发展路径. 总体而言, 为软件工程社区提供一份全面的RAG研究综述, 旨在帮助研究者系统了解现有成果, 洞察关键问题, 并推动该领域的进一步发展. |
| 关键词: 检索增强生成 软件工程 大语言模型 |
| DOI:10.13328/j.cnki.jos.007567 |
| 分类号: |
| 基金项目:国家自然科学基金(U24A20337, 62372228); 中央高校基本科研业务费专项资金(14380029) |
|
| Survey on Application of Retrieval-augmented Generation in Software Engineering |
|
ZHANG Quan-Jun1,2, XIE Yang1,2, FANG Chun-Rong1,2, YU Sheng-Cheng1,2, ZHAO Yuan1,2, CHEN Zhen-Yu1,2
|
|
1.State Key Laboratory for Novel Software Technology (Nanjing University), Nanjing 210093, China;2.Software Institute, Nanjing University, Nanjing 210093, China
|
| Abstract: |
| Retrieval-augmented generation (RAG) significantly enhances the performance of downstream software engineering tasks such as code generation, code completion, and program repair by combining information retrieval with language generation models. As RAG develops rapidly in software engineering, it is difficult for researchers to comprehensively grasp its current achievements, challenges, and future potential opportunities. This study presents the first systematic review of the application of RAG in software engineering from 2021 to 2024, summarizing and deeply analyzing 108 relevant high-quality studies from the perspectives of RAG’s core architecture and its applications in software engineering. Firstly, the key architectural components of RAG in the field of software engineering are discussed, and a detailed summary of common types of retrievers and generators is provided, with the integration methods of both summarized. Secondly, the application of RAG in various downstream software engineering tasks is mainly analyzed, such as code generation, code completion, and program repair. Additionally, a systematic review is provided for RAG’s practical methods and technical trends under different task scenarios. Finally, the challenges that the current RAG application faces are discussed, covering three stages of knowledge base construction, retrieval, and generation, with the future research directions and potential development paths pointed out. Generally, this study provides a comprehensive review of RAG research for the software engineering community, aiming to help researchers have a systematic understanding of the current achievements and an insight into key problems, and promote the further development of this field. |
| Key words: retrieval-augmented generation (RAG) software engineering large language model (LLM) |
|
|
|
|