GraphCodeAgent: Dual Graph-Guided LLM Agent for Retrieval-Augmented Repo-Level Code Generation
On the map: Retrieval-augmented generation → RAG for code
also in 1 more
Abstract (arXiv)
Writing code requires significant time and effort in software development. To automate this process, researchers have made substantial progress for code generation. Recently, large language models (LLMs) have demonstrated remarkable proficiency in function-level code generation, yet their performance significantly degrades in the real-world software development process, where coding tasks are deeply embedded within specific repository contexts. Existing studies attempt to use retrieval-augmented code generation (RACG) approaches to mitigate this demand. However, there is a gap between natural language (NL) requirements and programming implementations. This results in the failure to retrieve the relevant code of these fine-grained subtasks. To address this challenge, we propose GraphCodeAgent, a dual graph-guided LLM agent for retrieval-augmented repo-level code generation, bridging the gap between NL requirements and programming implementations. Our approach constructs two interconnected graphs: a Requirement Graph (RG) to model requirement relations of code snippets within the repository, as well as the relations between the target requirement and the requirements of these code snippets, and a Structural-Semantic Code Graph (SSCG) to capture the repository's intricate code dependencies. Guided by this, an LLM-powered agent performs multi-hop reasoning to systematically retrieve all context code snippets, including implicit and explicit code snippets, even if they are not explicitly expressed in requirements. We evaluated GraphCodeAgent on three advanced LLMs with the two widely-used repo-level code generation benchmarks DevEval and CoderEval. Extensive experiment results show that GraphCodeAgent significantly outperforms state-of-the-art baselines.
Key facts. Cited by 17 papers in the map (data through 7 Oct 2026). Placed in RAG for code, one of 15 directions in Retrieval-augmented generation. Builds on 31 of its 48 references that are in the map. First posted on arXiv 14 Apr 2025.
Builds on
31 of 48 references.
Closest ancestors · 1
Same direction, newest first
Other references · 30
- 2021Evaluating Large Language Models Trained on Codecited by 8,053
- 2025DeepSeek-R1: Incentivizing Reasoning Capability in LLMs via Reinforcement Learningcited by 6,146
- 2021Program Synthesis with Large Language Modelscited by 3,509
- 2023SWE-bench: Can Language Models Resolve Real-World GitHub Issues?cited by 3,193
- 2024Gemini 1.5: Unlocking multimodal understanding across millions of tokens of contextcited by 3,175
- 2024DeepSeek-Coder: When the Large Language Model Meets Programming -- The Rise of Code Intelligencecited by 1,154
- 2024Qwen2.5-Coder Technical Reportcited by 1,151
- 2021Measuring Coding Challenge Competence With APPScited by 879
- 2024DeepSeek-V3 Technical Reportcited by 724
- 2024StarCoder 2 and The Stack v2: The Next Generationcited by 484
- 2024Agentless: Demystifying LLM-based Software Engineering Agentscited by 400
- 2023RepoCoder: Repository-Level Code Completion Through Iterative Retrieval and Generationcited by 357
18 more
- 2024CodeAgent: Enhancing Code Generation with Tool-Integrated Agent Systems for Real-World Repo-level Coding Challengescited by 278
- 2024Code Generation with AlphaCodium: From Prompt Engineering to Flow Engineeringcited by 100
- 2018TRANX: A Transition-based Neural Abstract Syntax Parser for Semantic Parsing and Code Generationcited by 88
- 2025LocAgent: Graph-Guided LLM Agents for Code Localizationcited by 82
- 2024EvoCodeBench: An Evolving Code Generation Benchmark Aligned with Real-World Code Repositoriescited by 71
- 2024DevEval: A Manually-Annotated Code Generation Benchmark Aligned with Real-World Code Repositoriescited by 71
- 2024Evaluating Language Models for Efficient Code Generationcited by 69
- 2023CodeIE: Large Code Generation Models are Better Few-Shot Information Extractorscited by 67
- 2024DRAGIN: Dynamic Retrieval Augmented Generation based on the Information Needs of Large Language Modelscited by 63
- 2024CodexGraph: Bridging Large Language Models and Code Repositories via Code Graph Databasescited by 62
- 2024SelfCodeAlign: Self-Alignment for Code Generationcited by 61
- 2024Alibaba LingmaAgent: Improving Automated Issue Resolution via Comprehensive Repository Explorationcited by 58
- 2025OrcaLoca: An LLM Agent Framework for Software Issue Localizationcited by 43
- 2024REPOFUSE: Repository-Level Code Completion with Fused Dual Contextcited by 32
- 2024CodeDPO: Aligning Code Models with Self Generated and Verified Source Codecited by 32
- 2023AceCoder: Utilizing Existing Code to Enhance Code Generationcited by 25
- 2025LONGCODEU: Benchmarking Long-Context Language Models on Long Code Understandingcited by 13
- 2019Learning a Matching Model with Co-teaching for Multi-turn Response Selection in Retrieval-based Dialogue Systemscited by 7
Built on by
Citing papers per year: 2025: 6; 2026: 11.
17 papers.
Sort:
By area:
- 2026Code as Agent Harnesscited by 40
- 2025Retrieval-Augmented Code Generation: A Survey with Focus on Repository-Level Approachescited by 20
- 2025Beyond Synthetic Benchmarks: Evaluating LLM Performance on Real-World Class-Level Code Generationcited by 8
- 2026Codebase-Memory: Tree-Sitter-Based Knowledge Graphs for LLM Code Exploration via MCPcited by 6
- 2025Practical Code RAG at Scale: Task-Aware Retrieval Design Choices under Compute Budgetscited by 3
- 2026LARGER: Lexically Anchored Repository Graph Exploration and Retrievalcited by 2
- 2026CADIR: A Cross-Backend Editable Intermediate Representation for Agentic CAD Generationcited by 2
- 2025An Empirical Study on Strong-Weak Model Collaboration for Repo-level Code Generationcited by 1
- 2025Performance Evaluation of General Purpose Large Language Models for Basic Linear Algebra Subprograms Code Generationcited by 1
- 2025LSPRAG: LSP-Guided RAG for Language-Agnostic Real-Time Unit Test Generationcited by 1
- 2026ReCUBE: Evaluating Repository-Level Context Utilization in Code Generationcited by 1
- 2026Integrating Graphs, Large Language Models, and Agents: Reasoning and Retrievalcited by 1
5 more
- 2026DeepDiscovery: A Location-Inference Framework for Task-Level Repository Understandingcited by 1
- 2026Simulation Code Generation for Fluid Systems using Large Language Models: Benchmarking Models and Prompting Strategiescited by 1
- 2026Effective and Efficient Context Retrieval via Partial Dependency Graph for Repository-Level Code Generationcited by 1
- 2026ReproAgent: Contract-Guided Paper-to-Code Reproductioncited by 1
- 2026FeatLens: Feature-Guided Dynamic Code Graph Construction and Retrieval for Repository-Level Code Generationcited by 0
- 2026FeatLens: Feature-Guided Dynamic Code Graph Construction and Retrieval for Repository-Level Code Generation22 Sep 2026
- 2026ReproAgent: Contract-Guided Paper-to-Code Reproduction25 Aug 2026
- 2026Effective and Efficient Context Retrieval via Partial Dependency Graph for Repository-Level Code Generation3 Aug 2026
- 2026CADIR: A Cross-Backend Editable Intermediate Representation for Agentic CAD Generation1 Aug 2026
- 2026Simulation Code Generation for Fluid Systems using Large Language Models: Benchmarking Models and Prompting Strategies31 Jul 2026
- 2026DeepDiscovery: A Location-Inference Framework for Task-Level Repository Understanding22 Jun 2026
- 2026Code as Agent Harness18 May 2026
- 2026LARGER: Lexically Anchored Repository Graph Exploration and Retrieval8 May 2026
- 2026Integrating Graphs, Large Language Models, and Agents: Reasoning and Retrieval17 Apr 2026
- 2026Codebase-Memory: Tree-Sitter-Based Knowledge Graphs for LLM Code Exploration via MCP28 Mar 2026
- 2026ReCUBE: Evaluating Repository-Level Context Utilization in Code Generation26 Mar 2026
- 2025Beyond Synthetic Benchmarks: Evaluating LLM Performance on Real-World Class-Level Code Generation30 Oct 2025
5 more
- 2025LSPRAG: LSP-Guided RAG for Language-Agnostic Real-Time Unit Test Generation25 Oct 2025
- 2025Practical Code RAG at Scale: Task-Aware Retrieval Design Choices under Compute Budgets23 Oct 2025
- 2025Retrieval-Augmented Code Generation: A Survey with Focus on Repository-Level Approaches6 Oct 2025
- 2025Performance Evaluation of General Purpose Large Language Models for Basic Linear Algebra Subprograms Code Generation7 Jul 2025
- 2025An Empirical Study on Strong-Weak Model Collaboration for Repo-level Code Generation26 May 2025
- 2026Code as Agent Harnesscited by 40
- 2026Codebase-Memory: Tree-Sitter-Based Knowledge Graphs for LLM Code Exploration via MCPcited by 6
- 2026LARGER: Lexically Anchored Repository Graph Exploration and Retrievalcited by 2
- 2026CADIR: A Cross-Backend Editable Intermediate Representation for Agentic CAD Generationcited by 2
- 2026ReCUBE: Evaluating Repository-Level Context Utilization in Code Generationcited by 1
- 2026CADIR: A Cross-Backend Editable Intermediate Representation for Agentic CAD Generation1 Aug 2026
- 2026Code as Agent Harness18 May 2026
- 2026LARGER: Lexically Anchored Repository Graph Exploration and Retrieval8 May 2026
- 2026Codebase-Memory: Tree-Sitter-Based Knowledge Graphs for LLM Code Exploration via MCP28 Mar 2026
- 2026ReCUBE: Evaluating Repository-Level Context Utilization in Code Generation26 Mar 2026
- 2025Beyond Synthetic Benchmarks: Evaluating LLM Performance on Real-World Class-Level Code Generationcited by 8
- 2025Practical Code RAG at Scale: Task-Aware Retrieval Design Choices under Compute Budgetscited by 3
- 2025An Empirical Study on Strong-Weak Model Collaboration for Repo-level Code Generationcited by 1
- 2025Performance Evaluation of General Purpose Large Language Models for Basic Linear Algebra Subprograms Code Generationcited by 1
- 2025LSPRAG: LSP-Guided RAG for Language-Agnostic Real-Time Unit Test Generationcited by 1
- 2026DeepDiscovery: A Location-Inference Framework for Task-Level Repository Understandingcited by 1
- 2026Simulation Code Generation for Fluid Systems using Large Language Models: Benchmarking Models and Prompting Strategiescited by 1
- 2026ReproAgent: Contract-Guided Paper-to-Code Reproductioncited by 1
- 2026FeatLens: Feature-Guided Dynamic Code Graph Construction and Retrieval for Repository-Level Code Generationcited by 0
- 2026FeatLens: Feature-Guided Dynamic Code Graph Construction and Retrieval for Repository-Level Code Generation22 Sep 2026
- 2026ReproAgent: Contract-Guided Paper-to-Code Reproduction25 Aug 2026
- 2026Simulation Code Generation for Fluid Systems using Large Language Models: Benchmarking Models and Prompting Strategies31 Jul 2026
- 2026DeepDiscovery: A Location-Inference Framework for Task-Level Repository Understanding22 Jun 2026
- 2025Beyond Synthetic Benchmarks: Evaluating LLM Performance on Real-World Class-Level Code Generation30 Oct 2025
- 2025LSPRAG: LSP-Guided RAG for Language-Agnostic Real-Time Unit Test Generation25 Oct 2025
- 2025Practical Code RAG at Scale: Task-Aware Retrieval Design Choices under Compute Budgets23 Oct 2025
- 2025Performance Evaluation of General Purpose Large Language Models for Basic Linear Algebra Subprograms Code Generation7 Jul 2025
- 2025An Empirical Study on Strong-Weak Model Collaboration for Repo-level Code Generation26 May 2025
Similar, not cited
Close in wording, no citation either way
- 2025Code Graph Model (CGM): A Graph-Integrated Large Language Model for Repository-Level Software Engineering Tasks
- 2024LLM Agents Improve Semantic Code Search
- 2026CodeTeam: An LLM-Powered Multi-Agent Framework for Repository-Level Code Generation
- 2026Context-Augmented Code Generation Using Programming Knowledge Graphs
- 2025Requirements Development and Formalization for Reliable Code Generation: A Multi-Agent Vision
- 2025A Survey on Code Generation with LLM-based Agents
- 2025CodeVisionary: An Agent-based Framework for Evaluating Large Language Models in Code Generation
- 2025Guided Code Generation with LLMs: A Multi-Agent Framework for Complex Code Tasks