EVOR: Evolving Retrieval for Code Generation
On the map: Retrieval-augmented generation → RAG for code
Abstract (arXiv)
Recently the retrieval-augmented generation (RAG) has been successfully applied in code generation. However, existing pipelines for retrieval-augmented code generation (RACG) employ static knowledge bases with a single source, limiting the adaptation capabilities of Large Language Models (LLMs) to domains they have insufficient knowledge of. In this work, we develop a novel pipeline, EVOR, that employs the synchronous evolution of both queries and diverse knowledge bases. On two realistic settings where the external knowledge is required to solve code generation tasks, we compile four new datasets associated with frequently updated libraries and long-tail programming languages, named EVOR-BENCH. Extensive experiments demonstrate that EVOR achieves two to four times of execution accuracy compared to other methods such as Reflexion (Shinn et al., 2024), DocPrompting (Zhou et al., 2023), etc. We demonstrate that EVOR is flexible and can be easily combined with them to achieve further improvement. Further analysis reveals that EVOR benefits from the synchronous evolution of queries and documents and the diverse information sources in the knowledge base. We hope that our studies will inspire more insights into the design of advanced RACG pipelines in future research. Our model, code, and data are available at https://arks-codegen.github.io.
Key facts. Cited by 22 papers in the map (data through 7 Oct 2026). Placed in RAG for code, one of 15 directions in Retrieval-augmented generation. Builds on 37 of its 53 references that are in the map. First posted on arXiv 19 Feb 2024.
Builds on
37 of 53 references.
Closest ancestors · 3
Same direction, newest first
- 2023Retrieval-Augmented Code Generation for Universal Information Extraction6 Nov
- 2023RAP-Gen: Retrieval-Augmented Patch Generation with CodeT5 for Automatic Program Repair12 Sep
- 2021Retrieval Augmented Code Generation and Summarization26 Aug
Other references · 34
- 2020Language Models are Few-Shot Learnerscited by 32,199
- 2021Evaluating Large Language Models Trained on Codecited by 8,053
- 2020Dense Passage Retrieval for Open-Domain Question Answeringcited by 3,779
- 2021Program Synthesis with Large Language Modelscited by 3,509
- 2023Lost in the Middle: How Language Models Use Long Contextscited by 3,383
- 2023SWE-bench: Can Language Models Resolve Real-World GitHub Issues?cited by 3,193
- 2020REALM: Retrieval-Augmented Language Model Pre-Trainingcited by 2,126
- 2023Code Llama: Open Foundation Models for Codecited by 2,105
- 2021WebGPT: Browser-assisted question-answering with human feedbackcited by 1,722
- 2022Competition-Level Code Generation with AlphaCodecited by 1,427
- 2023Is Your Code Generated by ChatGPT Really Correct? Rigorous Evaluation of Large Language Models for Code Generationcited by 1,332
- 2021Improving language models by retrieving from trillions of tokenscited by 1,278
22 more
- 2020Leveraging Passage Retrieval with Generative Models for Open Domain Question Answeringcited by 1,203
- 2023Teaching Large Language Models to Self-Debugcited by 963
- 2022Atlas: Few-shot Learning with Retrieval Augmented Language Modelscited by 940
- 2022CodeGen: An Open Large Language Model for Code with Multi-Turn Program Synthesiscited by 876
- 2023StarCoder: may the source be with you!cited by 790
- 2023REPLUG: Retrieval-Augmented Black-Box Language Modelscited by 786
- 2022DS-1000: A Natural and Reliable Benchmark for Data Science Code Generationcited by 442
- 2022CodeT: Code Generation with Generated Testscited by 369
- 2023RepoCoder: Repository-Level Code Completion Through Iterative Retrieval and Generationcited by 357
- 2023Enhancing Retrieval-Augmented Large Language Models with Iterative Retrieval-Generation Synergycited by 343
- 2022One Embedder, Any Task: Instruction-Finetuned Text Embeddingscited by 329
- 2023RECOMP: Improving Retrieval-Augmented LMs with Compression and Selective Augmentationcited by 253
- 2023InterCode: Standardizing and Benchmarking Interactive Coding with Execution Feedbackcited by 229
- 2023Is Self-Repair a Silver Bullet for Code Generation?cited by 191
- 2022Natural Language to Code Translation with Executioncited by 122
- 2023Chain of Code: Reasoning with a Language Model-Augmented Code Emulatorcited by 120
- 2022Execution-Based Evaluation for Open-Domain Code Generationcited by 89
- 2022When Language Model Meets Private Librarycited by 54
- 2023Enhancing Large Language Models in Coding Through Multi-Perspective Self-Consistencycited by 46
- 2023ALGO: Synthesizing Algorithmic Programs with LLM-Generated Oracle Verifierscited by 41
- 2023ExeDec: Execution Decomposition for Compositional Generalization in Neural Program Synthesiscited by 17
- 2023Context Aware Query Rewriting for Text Rankers using LLMcited by 14
Built on by
Citing papers per year: 2024: 5; 2025: 10; 2026: 7.
22 papers.
Sort:
By area:
- 2024BRIGHT: A Realistic and Challenging Benchmark for Reasoning-Intensive Retrievalcited by 153
- 2024Spider2-V: How Far Are Multimodal Agents From Automating Data Science and Engineering Workflows?cited by 55
- 2025Retrieval-Augmented Code Generation: A Survey with Focus on Repository-Level Approachescited by 20
- 2025Give LLMs a Security Course: Securing Retrieval-Augmented Code Generation via Knowledge Injectioncited by 15
- 2025A Comprehensive Survey on Benchmarks and Solutions in Software Engineering of LLM-Empowered Agentic Systemcited by 15
- 2025CODEMENV: Benchmarking Large Language Models on Code Migrationcited by 13
- 2025When LLMs Meet API Documentation: Can Retrieval Augmentation Aid Code Generation Just as It Helps Developers?cited by 12
- 2024Preference-Guided Refactored Tuning for Retrieval Augmented Code Generationcited by 10
- 2025Exploring the Security Threats of Knowledge Base Poisoning in Retrieval-Augmented Code Generationcited by 9
- 2025From Large to Small: Transferring CUDA Optimization Expertise via Reasoning Graphcited by 9
- 2025More with Less: An Empirical Study of Turn-Control Strategies for Efficient Coding Agentscited by 8
- 2025AgentAda: Skill-Adaptive Data Analytics for Tailored Insight Discoverycited by 6
10 more
- 2024CodeGRAG: Bridging the Gap between Natural Language and Programming Language via Graphical Retrieval Augmented Generationcited by 4
- 2024Context-Augmented Code Generation Using Programming Knowledge Graphscited by 4
- 2025Across Programming Language Silos: A Study on Cross-Lingual Retrieval-augmented Code Generationcited by 3
- 2026Bridging the Knowledge Void: Inference-time Acquisition of Unfamiliar Programming Languages for Coding Taskscited by 1
- 2026HCAG: Hierarchical Abstraction and Retrieval-Augmented Generation on Theoretical Repositories with LLMscited by 1
- 2026When Retrieval Hurts Code Completion: A Diagnostic Study of Stale Repository Contextcited by 1
- 2026CodePoisonRAG: Knowledge Poisoning Attacks on Retrieval-Augmented Code Generationcited by 1
- 2026Prompt Driven Development with Claude Code: Building a Complete TUI Framework for the Ring Programming Languagecited by 0
- 2026Context-Augmented Code Generation Using Programming Knowledge Graphscited by 0
- 2026CodeMMR: Bridging Natural Language, Code, and Image for Unified Retrievalcited by 0
- 2026CodePoisonRAG: Knowledge Poisoning Attacks on Retrieval-Augmented Code Generation2 Sep 2026
- 2026When Retrieval Hurts Code Completion: A Diagnostic Study of Stale Repository Context14 May 2026
- 2026CodeMMR: Bridging Natural Language, Code, and Image for Unified Retrieval17 Apr 2026
- 2026HCAG: Hierarchical Abstraction and Retrieval-Augmented Generation on Theoretical Repositories with LLMs19 Mar 2026
- 2026Context-Augmented Code Generation Using Programming Knowledge Graphs28 Jan 2026
- 2026Prompt Driven Development with Claude Code: Building a Complete TUI Framework for the Ring Programming Language24 Jan 2026
- 2026Bridging the Knowledge Void: Inference-time Acquisition of Unfamiliar Programming Languages for Coding Tasks16 Jan 2026
- 2025From Large to Small: Transferring CUDA Optimization Expertise via Reasoning Graph22 Oct 2025
- 2025More with Less: An Empirical Study of Turn-Control Strategies for Efficient Coding Agents19 Oct 2025
- 2025A Comprehensive Survey on Benchmarks and Solutions in Software Engineering of LLM-Empowered Agentic System10 Oct 2025
- 2025Retrieval-Augmented Code Generation: A Survey with Focus on Repository-Level Approaches6 Oct 2025
- 2025Across Programming Language Silos: A Study on Cross-Lingual Retrieval-augmented Code Generation4 Jun 2025
10 more
- 2025CODEMENV: Benchmarking Large Language Models on Code Migration1 Jun 2025
- 2025Give LLMs a Security Course: Securing Retrieval-Augmented Code Generation via Knowledge Injection23 Apr 2025
- 2025AgentAda: Skill-Adaptive Data Analytics for Tailored Insight Discovery10 Apr 2025
- 2025When LLMs Meet API Documentation: Can Retrieval Augmentation Aid Code Generation Just as It Helps Developers?19 Mar 2025
- 2025Exploring the Security Threats of Knowledge Base Poisoning in Retrieval-Augmented Code Generation5 Feb 2025
- 2024Context-Augmented Code Generation Using Programming Knowledge Graphs9 Oct 2024
- 2024Preference-Guided Refactored Tuning for Retrieval Augmented Code Generation24 Sep 2024
- 2024BRIGHT: A Realistic and Challenging Benchmark for Reasoning-Intensive Retrieval16 Jul 2024
- 2024Spider2-V: How Far Are Multimodal Agents From Automating Data Science and Engineering Workflows?15 Jul 2024
- 2024CodeGRAG: Bridging the Gap between Natural Language and Programming Language via Graphical Retrieval Augmented Generation3 May 2024
- 2025Retrieval-Augmented Code Generation: A Survey with Focus on Repository-Level Approachescited by 20
- 2025Give LLMs a Security Course: Securing Retrieval-Augmented Code Generation via Knowledge Injectioncited by 15
- 2025When LLMs Meet API Documentation: Can Retrieval Augmentation Aid Code Generation Just as It Helps Developers?cited by 12
- 2024Preference-Guided Refactored Tuning for Retrieval Augmented Code Generationcited by 10
- 2025Exploring the Security Threats of Knowledge Base Poisoning in Retrieval-Augmented Code Generationcited by 9
- 2024CodeGRAG: Bridging the Gap between Natural Language and Programming Language via Graphical Retrieval Augmented Generationcited by 4
- 2025Across Programming Language Silos: A Study on Cross-Lingual Retrieval-augmented Code Generationcited by 3
- 2026HCAG: Hierarchical Abstraction and Retrieval-Augmented Generation on Theoretical Repositories with LLMscited by 1
- 2026When Retrieval Hurts Code Completion: A Diagnostic Study of Stale Repository Contextcited by 1
- 2026CodePoisonRAG: Knowledge Poisoning Attacks on Retrieval-Augmented Code Generationcited by 1
- 2026CodeMMR: Bridging Natural Language, Code, and Image for Unified Retrievalcited by 0
- 2026CodePoisonRAG: Knowledge Poisoning Attacks on Retrieval-Augmented Code Generation2 Sep 2026
- 2026When Retrieval Hurts Code Completion: A Diagnostic Study of Stale Repository Context14 May 2026
- 2026CodeMMR: Bridging Natural Language, Code, and Image for Unified Retrieval17 Apr 2026
- 2026HCAG: Hierarchical Abstraction and Retrieval-Augmented Generation on Theoretical Repositories with LLMs19 Mar 2026
- 2025Retrieval-Augmented Code Generation: A Survey with Focus on Repository-Level Approaches6 Oct 2025
- 2025Across Programming Language Silos: A Study on Cross-Lingual Retrieval-augmented Code Generation4 Jun 2025
- 2025Give LLMs a Security Course: Securing Retrieval-Augmented Code Generation via Knowledge Injection23 Apr 2025
- 2025When LLMs Meet API Documentation: Can Retrieval Augmentation Aid Code Generation Just as It Helps Developers?19 Mar 2025
- 2025Exploring the Security Threats of Knowledge Base Poisoning in Retrieval-Augmented Code Generation5 Feb 2025
- 2024Preference-Guided Refactored Tuning for Retrieval Augmented Code Generation24 Sep 2024
- 2024CodeGRAG: Bridging the Gap between Natural Language and Programming Language via Graphical Retrieval Augmented Generation3 May 2024
- 2024Spider2-V: How Far Are Multimodal Agents From Automating Data Science and Engineering Workflows?cited by 55
- 2025A Comprehensive Survey on Benchmarks and Solutions in Software Engineering of LLM-Empowered Agentic Systemcited by 15
- 2025More with Less: An Empirical Study of Turn-Control Strategies for Efficient Coding Agentscited by 8
- 2025More with Less: An Empirical Study of Turn-Control Strategies for Efficient Coding Agents19 Oct 2025
- 2025A Comprehensive Survey on Benchmarks and Solutions in Software Engineering of LLM-Empowered Agentic System10 Oct 2025
- 2024Spider2-V: How Far Are Multimodal Agents From Automating Data Science and Engineering Workflows?15 Jul 2024
- 2024BRIGHT: A Realistic and Challenging Benchmark for Reasoning-Intensive Retrievalcited by 153
- 2025CODEMENV: Benchmarking Large Language Models on Code Migrationcited by 13
- 2025AgentAda: Skill-Adaptive Data Analytics for Tailored Insight Discoverycited by 6
- 2024Context-Augmented Code Generation Using Programming Knowledge Graphscited by 4
- 2026Bridging the Knowledge Void: Inference-time Acquisition of Unfamiliar Programming Languages for Coding Taskscited by 1
- 2026Prompt Driven Development with Claude Code: Building a Complete TUI Framework for the Ring Programming Languagecited by 0
- 2026Context-Augmented Code Generation Using Programming Knowledge Graphscited by 0
- 2026Context-Augmented Code Generation Using Programming Knowledge Graphs28 Jan 2026
- 2026Prompt Driven Development with Claude Code: Building a Complete TUI Framework for the Ring Programming Language24 Jan 2026
- 2026Bridging the Knowledge Void: Inference-time Acquisition of Unfamiliar Programming Languages for Coding Tasks16 Jan 2026
- 2025CODEMENV: Benchmarking Large Language Models on Code Migration1 Jun 2025
- 2025AgentAda: Skill-Adaptive Data Analytics for Tailored Insight Discovery10 Apr 2025
- 2024Context-Augmented Code Generation Using Programming Knowledge Graphs9 Oct 2024
- 2024BRIGHT: A Realistic and Challenging Benchmark for Reasoning-Intensive Retrieval16 Jul 2024
Similar, not cited
Close in wording, no citation either way
- 2024CodeRAG-Bench: Can Retrieval Augment Code Generation?
- 2025What to Retrieve for Effective Retrieval-Augmented Code Generation? An Empirical Study and Beyond
- 2025FastCoder: Accelerating Repository-level Code Generation via Efficient Retrieval and Verification
- 2024Repoformer: Selective Retrieval for Repository-Level Code Completion
- 2026Are you Synthesizing or Recalling? Evaluating LLMs on Algorithmic Code Retrieval
- 2024Evaluating the Effectiveness and Efficiency of Demonstration Retrievers in RAG for Coding Tasks
- 2026Do Not Treat Code as Natural Language: Implications for Repository-Level Code Generation and Beyond
- 2025An Empirical Study of Retrieval-Augmented Code Generation: Challenges and Opportunities