Retrieval Augmented Code Generation and Summarization
On the map: Retrieval-augmented generation → RAG for code
Abstract (arXiv)
Software developers write a lot of source code and documentation during software development. Intrinsically, developers often recall parts of source code or code summaries that they had written in the past while implementing software or documenting them. To mimic developers' code or summary generation behavior, we propose a retrieval augmented framework, REDCODER, that retrieves relevant code or summaries from a retrieval database and provides them as a supplement to code generation or summarization models. REDCODER has a couple of uniqueness. First, it extends the state-of-the-art dense retrieval technique to search for relevant code or summaries. Second, it can work with retrieval databases that include unimodal (only code or natural language description) or bimodal instances (code-description pairs). We conduct experiments and extensive analysis on two benchmark datasets of code generation and summarization in Java and Python, and the promising results endorse the effectiveness of our proposed retrieval augmented framework.
Key facts. Cited by 148 papers in the map (data through 7 Oct 2026). Placed in RAG for code, one of 15 directions in Retrieval-augmented generation. Builds on 38 of its 60 references that are in the map. First posted on arXiv 26 Aug 2021.
Builds on
38 of 60 references.
Closest ancestors · 1
Same direction, newest first
Other references · 37
- 2017Attention Is All You Needcited by 59,932
- 2018BERT: Pre-training of Deep Bidirectional Transformers for Language Understandingcited by 40,204
- 2019RoBERTa: A Robustly Optimized BERT Pretraining Approachcited by 13,266
- 2020Retrieval-Augmented Generation for Knowledge-Intensive NLP Taskscited by 9,160
- 2020Dense Passage Retrieval for Open-Domain Question Answeringcited by 3,779
- 2014Sequence to Sequence Learning with Neural Networkscited by 2,974
- 2020CodeBERT: A Pre-Trained Model for Programming and Natural Languagescited by 1,286
- 2020Leveraging Passage Retrieval with Generative Models for Open Domain Question Answeringcited by 1,203
- 2015Effective Approaches to Attention-based Neural Machine Translationcited by 1,024
- 2021CodeXGLUE: A Machine Learning Benchmark Dataset for Code Understanding and Generationcited by 732
- 2019CodeSearchNet Challenge: Evaluating the State of Semantic Code Searchcited by 638
- 2020GraphCodeBERT: Pre-training Code Representations with Data Flowcited by 600
25 more
- 2020CodeBLEU: a Method for Automatic Evaluation of Code Synthesiscited by 468
- 2021Unified Pre-training for Program Understanding and Generationcited by 361
- 2017A Survey of Machine Learning for Big Code and Naturalnesscited by 220
- 2019Poly-encoders: Transformer Architectures and Pre-training Strategies for Fast and Accurate Multi-sentence Scoringcited by 164
- 2020A Transformer-based Approach for Source Code Summarizationcited by 129
- 2019Learning Dense Representations for Entity Retrievalcited by 122
- 2018Mapping Language to Code in Programmatic Contextcited by 104
- 2017Abstract Syntax Networks for Code Generation and Semantic Parsingcited by 92
- 2016A Convolutional Attention Network for Extreme Summarization of Source Codecited by 90
- 2019A Neural Model for Generating Natural Language Summaries of Program Subroutinescited by 76
- 2018A Retrieve-and-Edit Framework for Predicting Structured Outputscited by 73
- 2019Code Generation as a Dual Task of Code Summarizationcited by 62
- 2016Deep API Learningcited by 41
- 2018Retrieval-Based Neural Code Generationcited by 41
- 2021In-IDE Code Generation from Natural Language: Promise and Challengescited by 41
- 2020Incorporating External Knowledge through Pre-training for Natural Language to Code Generationcited by 36
- 2015Quantization based Fast Inner Product Searchcited by 29
- 2019Automatic Source Code Summarization with Extended Tree-LSTMcited by 28
- 2019Tree-Transformer: A Transformer-Based Method for Correction of Tree-Structured Datacited by 20
- 2018Automatic Generation of Text Descriptive Comments for Code Blockscited by 18
- 2019Coupling Retrieval and Meta-Learning for Context-Dependent Semantic Parsingcited by 18
- 2019Learning Programmatic Idioms for Scalable Semantic Parsingcited by 17
- 2018Building Language Models for Text with Named Entitiescited by 15
- 2018Evaluating How Developers Use General-Purpose Web-Search for Code Retrievalcited by 6
- 2016Software search is not a science, even among scientists: A survey of how scientists and engineers find softwarecited by 2
Built on by
Citing papers per year: 2021: 1; 2022: 14; 2023: 23; 2024: 46; 2025: 40; 2026: 24.
148 papers.
Sort:
By area:
- 2023AutoGen: Enabling Next-Gen LLM Applications via Multi-Agent Conversationcited by 1,906
- 2024A Survey on Large Language Models for Code Generationcited by 646
- 2024A Survey on RAG Meeting LLMs: Towards Retrieval-Augmented Large Language Modelscited by 450
- 2023LeanDojo: Theorem Proving with Retrieval-Augmented Language Modelscited by 414
- 2023RepoCoder: Repository-Level Code Completion Through Iterative Retrieval and Generationcited by 357
- 2024Retrieval-Augmented Generation for AI-Generated Content: A Surveycited by 352
- 2023CodeT5+: Open Code Large Language Models for Code Understanding and Generationcited by 327
- 2024MapCoder: Multi-Agent Code Generation for Competitive Problem Solvingcited by 177
- 2024The Good and The Bad: Exploring Privacy Issues in Retrieval-Augmented Generation (RAG)cited by 159
- 2022DocPrompting: Generating Code by Retrieving the Docscited by 151
- 2023Physics of Language Models: Part 3.2, Knowledge Manipulationcited by 142
- 2022ReACC: A Retrieval-Augmented Code Completion Frameworkcited by 117
38 more
- 2023Lift Yourself Up: Retrieval-augmented Text Generation with Self Memorycited by 103
- 2024A Comprehensive Survey on Process-Oriented Automatic Text Summarization with Exploration of LLM-Based Methodscited by 101
- 2023Retrieving Multimodal Information for Augmented Generation: A Surveycited by 84
- 2024BadRAG: Identifying Vulnerabilities in Retrieval Augmented Generation of Large Language Modelscited by 84
- 2024A Systematic Survey and Critical Review on Evaluating Large Language Models: Challenges, Limitations, and Recommendationscited by 84
- 2023Is ChatGPT the Ultimate Programming Assistant -- How far is it?cited by 72
- 2023Enhancing Financial Sentiment Analysis via Retrieval Augmented Large Language Modelscited by 67
- 2024LitLLM: A Toolkit for Scientific Literature Reviewcited by 61
- 2024RAGChecker: A Fine-grained Framework for Diagnosing Retrieval-Augmented Generationcited by 59
- 2025VDocRAG: Retrieval-Augmented Generation over Visually-Rich Documentscited by 57
- 2022When Language Model Meets Private Librarycited by 54
- 2022NatGen: Generative pre-training by "Naturalizing" source codecited by 53
- 2024Mitigating the Privacy Issues in Retrieval-Augmented Generation (RAG) via Pure Synthetic Datacited by 52
- 2022Compilable Neural Code Generation with Compiler Feedbackcited by 46
- 2023xCodeEval: A Large Scale Multilingual Multitask Benchmark for Code Understanding, Generation, Translation and Retrievalcited by 46
- 2021Multilingual training for Software Engineeringcited by 43
- 2023SelfEvolve: A Code Evolution Framework via Large Language Modelscited by 43
- 2023RAP-Gen: Retrieval-Augmented Patch Generation with CodeT5 for Automatic Program Repaircited by 43
- 2025Ask in Any Modality: A Comprehensive Survey on Multimodal Retrieval-Augmented Generationcited by 42
- 2023RepoFusion: Training Code Models to Understand Your Repositorycited by 40
- 2024Dataflow-Guided Retrieval Augmentation for Repository-Level Code Completioncited by 40
- 2024GraphCoder: Enhancing Repository-Level Code Completion via Code Context Graph-based Retrieval and Language Modelcited by 40
- 2024Automatic Programming: Large Language Models and Beyondcited by 35
- 2024RAG-DDR: Optimizing Retrieval-Augmented Generation Using Differentiable Data Rewardscited by 33
- 2024CodeXEmbed: A Generalist Embedding Model Family for Multiligual and Multi-task Code Retrievalcited by 33
- 2025CODESIM: Multi-Agent Code Generation and Problem Solving through Simulation-Driven Planning and Debuggingcited by 31
- 2025A Systematic Review of Key Retrieval-Augmented Generation (RAG) Systems: Progress, Gaps, and Future Directionscited by 30
- 2023Exploring Parameter-Efficient Fine-Tuning Techniques for Code Generation with Large Language Modelscited by 28
- 2023AceCoder: Utilizing Existing Code to Enhance Code Generationcited by 25
- 2024RAG and RAU: A Survey on Retrieval-Augmented Language Model in Natural Language Processingcited by 25
- 2024Rango: Adaptive Retrieval-Augmented Proving for Automated Software Verificationcited by 25
- 2024CodeMirage: Hallucinations in Code Generated by Large Language Modelscited by 23
- 2024EVOR: Evolving Retrieval for Code Generationcited by 22
- 2025What to Retrieve for Effective Retrieval-Augmented Code Generation? An Empirical Study and Beyondcited by 22
- 2022CodeRetriever: Unimodal and Bimodal Contrastive Learning for Code Searchcited by 21
- 2022CoNT: Contrastive Neural Text Generationcited by 21
- 2023CodeTF: One-stop Transformer Library for State-of-the-art Code LLMscited by 21
- 2024RAM-EHR: Retrieval Augmentation Meets Clinical Predictions on Electronic Health Recordscited by 21
50 most cited of 148 All 148 (JSON)
- 2026CIG-MIA: Context-Induced Information Gain Membership Inference Attacks against Retrieval-Augmented Generation13 Sep 2026
- 2026MARS: Multi-Specialist LLM Relay System for Competitive Programming24 Aug 2026
- 2026varepsilon-MemEvo: Adaptive Cross-Task Memory Transfer for LLM Program Evolution12 Aug 2026
- 2026Example-Guided Prompting for Document-Level Text Simplification5 Aug 2026
- 2026RepoReasoner: Evaluating Repository-Level Code Reasoning Ability of Long-Context Language Models28 Jul 2026
- 2026Beyond "What to Retrieve": Uncertainty in Retrieval-Augmented Code Generation27 Jul 2026
- 2026Poison with Style: A Practical Poisoning Attack on Code Large Language Models26 May 2026
- 2026PennySynth: RAG-Driven Data Synthesis for Automated Quantum Code Generation25 May 2026
- 2026A Tertiary Review of Large Language Model-Based Code Generating Tasks: Trends, Challenges, and Future Directions25 May 2026
- 2026BLAgent: Agentic RAG for File-Level Bug Localization18 May 2026
- 2026Not All RAGs Are Created Equal: A Component-Wise Empirical Study for Software Engineering Tasks14 May 2026
- 2026RAG-Reflect: Agentic Retrieval-Augmented Generation with Reflections for Comment-Driven Code Maintenance on Stack Overflow24 Apr 2026
38 more
- 2026SolidCoder: Bridging the Mental-Reality Gap in LLM Code Generation through Concrete Execution20 Apr 2026
- 2026Prompt-Driven Code Summarization: A Systematic Literature Review16 Apr 2026
- 2026Enhancing Large Language Models with Retrieval Augmented Generation for Software Testing and Inspection Automation16 Apr 2026
- 2026CollabCoder: Plan-Code Co-Evolution via Collaborative Decision-Making for Efficient Code Generation15 Apr 2026
- 2026An Industrial-Scale Retrieval-Augmented Generation Framework for Requirements Engineering: Empirical Evaluation with Automotive Manufacturing Data20 Mar 2026
- 2026SYMDIREC: A Neuro-Symbolic Divide-Retrieve-Conquer Framework for Enhanced RTL Synthesis and Summarization17 Mar 2026
- 2026Hierarchical Embedding Fusion for Retrieval-Augmented Code Generation4 Feb 2026
- 2026Canonical Intermediate Representation for LLM-based optimization problem formulation and code generation2 Feb 2026
- 2026Context-Augmented Code Generation Using Programming Knowledge Graphs28 Jan 2026
- 2026AlignCoder: Aligning Retrieval with Target Intent for Repository-Level Code Completion27 Jan 2026
- 2026Semantic Caching and Intent-Driven Context Optimization for Multi-Agent Natural Language to Code Systems16 Jan 2026
- 2026RepoShapley: Shapley-Enhanced Context Filtering for Repository-Level Code Completion6 Jan 2026
- 2025DataGovBench: Benchmarking LLM Agents for Real-World Data Governance Workflows4 Dec 2025
- 2025Toward Automated and Trustworthy Scientific Analysis and Visualization with LLM-Generated Code26 Nov 2025
- 2025When More Retrieval Hurts: Retrieval-Augmented Code Review Generation7 Nov 2025
- 2025RESCUE: Retrieval Augmented Secure Code Generation21 Oct 2025
- 2025MOSAIC: Multi-agent Orchestration for Task-Intelligent Scientific Coding9 Oct 2025
- 2025RANGER -- Repository-Level Agent for Graph-Enhanced Retrieval27 Sep 2025
- 2025Understanding Benchmark Language Under Weakened Formal Semantics22 Sep 2025
- 2025Handling Open-Vocabulary Constructs in Formalizing Specifications: Retrieval-Augmented Parsing with Expert Knowledge10 Sep 2025
- 2025Diverse And Private Synthetic Datasets Generation for RAG evaluation: A multi-agent framework26 Aug 2025
- 2025EyeMulator: Improving Code Language Models by Mimicking Human Visual Attention22 Aug 2025
- 2025Tapas Are Free! Training-Free Adaptation of Programmatic Agents via LLM-Guided Program Synthesis in Dynamic Environments15 Aug 2025
- 2025Privacy-Aware Decoding: Mitigating Privacy Leakage of Large Language Models in Retrieval-Augmented Generation5 Aug 2025
- 2025ChatVis: Large Language Model Agent for Generating Scientific Visualizations30 Jul 2025
- 2025SelfRACG: Enabling LLMs to Self-Express and Retrieve for Code Generation25 Jul 2025
- 2025A Systematic Review of Key Retrieval-Augmented Generation (RAG) Systems: Progress, Gaps, and Future Directions25 Jul 2025
- 2025MemoCoder: Automated Function Synthesis using LLM-Supported Agents24 Jul 2025
- 2025Am I on the Right Track? What Can Predicted Query Performance Tell Us about the Search Behaviour of Agentic RAG14 Jul 2025
- 2025SACL: Understanding and Combating Textual Bias in Code Retrieval with Semantic-Augmented Reranking and Localization25 Jun 2025
- 2025Retrieval-Augmented Code Review Comment Generation13 Jun 2025
- 2025Across Programming Language Silos: A Study on Cross-Lingual Retrieval-augmented Code Generation4 Jun 2025
- 2025AI4Contracts: LLM & RAG-Powered Encoding of Financial Derivative Contracts1 Jun 2025
- 2025SwingArena: Competitive Programming Arena for Long-context GitHub Issue Solving29 May 2025
- 2025Diagnosing and Resolving Cloud Platform Instability with Multi-modal RAG LLMs27 May 2025
- 2025Empowering AI to Generate Better AI Code: Guided Generation of Deep Learning Projects with LLMs21 Apr 2025
- 2025VDocRAG: Retrieval-Augmented Generation over Visually-Rich Documents14 Apr 2025
- 2025The Other Side of the Coin: Exploring Fairness in Retrieval-Augmented Generation11 Apr 2025
50 newest of 148 All 148 (JSON)
- 2024A Survey on RAG Meeting LLMs: Towards Retrieval-Augmented Large Language Modelscited by 450
- 2023LeanDojo: Theorem Proving with Retrieval-Augmented Language Modelscited by 414
- 2024Retrieval-Augmented Generation for AI-Generated Content: A Surveycited by 352
- 2024The Good and The Bad: Exploring Privacy Issues in Retrieval-Augmented Generation (RAG)cited by 159
- 2022ReACC: A Retrieval-Augmented Code Completion Frameworkcited by 117
- 2023Lift Yourself Up: Retrieval-augmented Text Generation with Self Memorycited by 103
- 2024BadRAG: Identifying Vulnerabilities in Retrieval Augmented Generation of Large Language Modelscited by 84
- 2023Enhancing Financial Sentiment Analysis via Retrieval Augmented Large Language Modelscited by 67
- 2024RAGChecker: A Fine-grained Framework for Diagnosing Retrieval-Augmented Generationcited by 59
- 2025VDocRAG: Retrieval-Augmented Generation over Visually-Rich Documentscited by 57
- 2024Mitigating the Privacy Issues in Retrieval-Augmented Generation (RAG) via Pure Synthetic Datacited by 52
- 2023RAP-Gen: Retrieval-Augmented Patch Generation with CodeT5 for Automatic Program Repaircited by 43
12 most cited of 60 All 60 (JSON)
- 2026CIG-MIA: Context-Induced Information Gain Membership Inference Attacks against Retrieval-Augmented Generation13 Sep 2026
- 2026Beyond "What to Retrieve": Uncertainty in Retrieval-Augmented Code Generation27 Jul 2026
- 2026BLAgent: Agentic RAG for File-Level Bug Localization18 May 2026
- 2026Not All RAGs Are Created Equal: A Component-Wise Empirical Study for Software Engineering Tasks14 May 2026
- 2026RAG-Reflect: Agentic Retrieval-Augmented Generation with Reflections for Comment-Driven Code Maintenance on Stack Overflow24 Apr 2026
- 2026Enhancing Large Language Models with Retrieval Augmented Generation for Software Testing and Inspection Automation16 Apr 2026
- 2026An Industrial-Scale Retrieval-Augmented Generation Framework for Requirements Engineering: Empirical Evaluation with Automotive Manufacturing Data20 Mar 2026
- 2026Hierarchical Embedding Fusion for Retrieval-Augmented Code Generation4 Feb 2026
- 2026RepoShapley: Shapley-Enhanced Context Filtering for Repository-Level Code Completion6 Jan 2026
- 2025When More Retrieval Hurts: Retrieval-Augmented Code Review Generation7 Nov 2025
- 2025RESCUE: Retrieval Augmented Secure Code Generation21 Oct 2025
- 2025Handling Open-Vocabulary Constructs in Formalizing Specifications: Retrieval-Augmented Parsing with Expert Knowledge10 Sep 2025
12 newest of 60 All 60 (JSON)
- 2023AutoGen: Enabling Next-Gen LLM Applications via Multi-Agent Conversationcited by 1,906
- 2025CODESIM: Multi-Agent Code Generation and Problem Solving through Simulation-Driven Planning and Debuggingcited by 31
- 2025Tapas Are Free! Training-Free Adaptation of Programmatic Agents via LLM-Guided Program Synthesis in Dynamic Environmentscited by 9
- 2025ChatVis: Large Language Model Agent for Generating Scientific Visualizationscited by 7
- 2025DataGovBench: Benchmarking LLM Agents for Real-World Data Governance Workflowscited by 4
- 2024Revolutionizing Bridge Operation and Maintenance with LLM-based Agents: An Overview of Applications and Insightscited by 3
- 2025MOSAIC: Multi-agent Orchestration for Task-Intelligent Scientific Codingcited by 2
- 2025MemoCoder: Automated Function Synthesis using LLM-Supported Agentscited by 1
- 2026Semantic Caching and Intent-Driven Context Optimization for Multi-Agent Natural Language to Code Systemscited by 0
- 2026Semantic Caching and Intent-Driven Context Optimization for Multi-Agent Natural Language to Code Systems16 Jan 2026
- 2025DataGovBench: Benchmarking LLM Agents for Real-World Data Governance Workflows4 Dec 2025
- 2025MOSAIC: Multi-agent Orchestration for Task-Intelligent Scientific Coding9 Oct 2025
- 2025Tapas Are Free! Training-Free Adaptation of Programmatic Agents via LLM-Guided Program Synthesis in Dynamic Environments15 Aug 2025
- 2025ChatVis: Large Language Model Agent for Generating Scientific Visualizations30 Jul 2025
- 2025MemoCoder: Automated Function Synthesis using LLM-Supported Agents24 Jul 2025
- 2025CODESIM: Multi-Agent Code Generation and Problem Solving through Simulation-Driven Planning and Debugging8 Feb 2025
- 2024Revolutionizing Bridge Operation and Maintenance with LLM-based Agents: An Overview of Applications and Insights14 Jul 2024
- 2023AutoGen: Enabling Next-Gen LLM Applications via Multi-Agent Conversation16 Aug 2023
- 2024MapCoder: Multi-Agent Code Generation for Competitive Problem Solvingcited by 177
- 2025Am I on the Right Track? What Can Predicted Query Performance Tell Us about the Search Behaviour of Agentic RAGcited by 5
- 2026RepoReasoner: Evaluating Repository-Level Code Reasoning Ability of Long-Context Language Modelscited by 5
- 2025MoT: Modularization-of-Thought Prompting for Effective Code Generationcited by 2
- 2026RepoReasoner: Evaluating Repository-Level Code Reasoning Ability of Long-Context Language Models28 Jul 2026
- 2025Am I on the Right Track? What Can Predicted Query Performance Tell Us about the Search Behaviour of Agentic RAG14 Jul 2025
- 2025MoT: Modularization-of-Thought Prompting for Effective Code Generation16 Mar 2025
- 2024MapCoder: Multi-Agent Code Generation for Competitive Problem Solving18 May 2024
- 2024A Survey on Large Language Models for Code Generationcited by 646
- 2023RepoCoder: Repository-Level Code Completion Through Iterative Retrieval and Generationcited by 357
- 2023CodeT5+: Open Code Large Language Models for Code Understanding and Generationcited by 327
- 2022DocPrompting: Generating Code by Retrieving the Docscited by 151
- 2023Physics of Language Models: Part 3.2, Knowledge Manipulationcited by 142
- 2024A Comprehensive Survey on Process-Oriented Automatic Text Summarization with Exploration of LLM-Based Methodscited by 101
- 2023Retrieving Multimodal Information for Augmented Generation: A Surveycited by 84
- 2024A Systematic Survey and Critical Review on Evaluating Large Language Models: Challenges, Limitations, and Recommendationscited by 84
- 2023Is ChatGPT the Ultimate Programming Assistant -- How far is it?cited by 72
- 2024LitLLM: A Toolkit for Scientific Literature Reviewcited by 61
- 2022When Language Model Meets Private Librarycited by 54
- 2022NatGen: Generative pre-training by "Naturalizing" source codecited by 53
12 most cited of 74 All 74 (JSON)
- 2026MARS: Multi-Specialist LLM Relay System for Competitive Programming24 Aug 2026
- 2026varepsilon-MemEvo: Adaptive Cross-Task Memory Transfer for LLM Program Evolution12 Aug 2026
- 2026Example-Guided Prompting for Document-Level Text Simplification5 Aug 2026
- 2026Poison with Style: A Practical Poisoning Attack on Code Large Language Models26 May 2026
- 2026A Tertiary Review of Large Language Model-Based Code Generating Tasks: Trends, Challenges, and Future Directions25 May 2026
- 2026SolidCoder: Bridging the Mental-Reality Gap in LLM Code Generation through Concrete Execution20 Apr 2026
- 2026Prompt-Driven Code Summarization: A Systematic Literature Review16 Apr 2026
- 2026CollabCoder: Plan-Code Co-Evolution via Collaborative Decision-Making for Efficient Code Generation15 Apr 2026
- 2026SYMDIREC: A Neuro-Symbolic Divide-Retrieve-Conquer Framework for Enhanced RTL Synthesis and Summarization17 Mar 2026
- 2026Canonical Intermediate Representation for LLM-based optimization problem formulation and code generation2 Feb 2026
- 2026Context-Augmented Code Generation Using Programming Knowledge Graphs28 Jan 2026
- 2026AlignCoder: Aligning Retrieval with Target Intent for Repository-Level Code Completion27 Jan 2026
12 newest of 74 All 74 (JSON)
Similar, not cited
Close in wording, no citation either way
- 2025Retrieval-Augmented Code Generation: A Survey with Focus on Repository-Level Approaches
- 2024CodeRAG-Bench: Can Retrieval Augment Code Generation?
- 2025A Deep Dive into Retrieval-Augmented Generation for Code Completion: Experience on WeChat
- 2026Do Not Treat Code as Natural Language: Implications for Repository-Level Code Generation and Beyond
- 2026CodeMMR: Bridging Natural Language, Code, and Image for Unified Retrieval
- 2025When Retriever Meets Generator: A Joint Model for Code Comment Generation ↗
- 2025Impact-driven Context Filtering For Cross-file Code Completion
- 2025cAST: Enhancing Code Retrieval-Augmented Generation with Structural Chunking via Abstract Syntax Tree