mlsanityData to 7 Oct 2026

GraphCodeAgent: Dual Graph-Guided LLM Agent for Retrieval-Augmented Repo-Level Code Generation

arXiv 2504.10046 ↗First posted 14 Apr 2025cs.SEcited by 17

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

  1. 2024GraphCoder: Enhancing Repository-Level Code Completion via Code Context Graph-based Retrieval and Language Model11 Jun

Other references · 30

  1. 2021Evaluating Large Language Models Trained on Codecited by 8,053
  2. 2025DeepSeek-R1: Incentivizing Reasoning Capability in LLMs via Reinforcement Learningcited by 6,146
  3. 2021Program Synthesis with Large Language Modelscited by 3,509
  4. 2023SWE-bench: Can Language Models Resolve Real-World GitHub Issues?cited by 3,193
  5. 2024Gemini 1.5: Unlocking multimodal understanding across millions of tokens of contextcited by 3,175
  6. 2024DeepSeek-Coder: When the Large Language Model Meets Programming -- The Rise of Code Intelligencecited by 1,154
  7. 2024Qwen2.5-Coder Technical Reportcited by 1,151
  8. 2021Measuring Coding Challenge Competence With APPScited by 879
  9. 2024DeepSeek-V3 Technical Reportcited by 724
  10. 2024StarCoder 2 and The Stack v2: The Next Generationcited by 484
  11. 2024Agentless: Demystifying LLM-based Software Engineering Agentscited by 400
  12. 2023RepoCoder: Repository-Level Code Completion Through Iterative Retrieval and Generationcited by 357
18 more
  1. 2024CodeAgent: Enhancing Code Generation with Tool-Integrated Agent Systems for Real-World Repo-level Coding Challengescited by 278
  2. 2024Code Generation with AlphaCodium: From Prompt Engineering to Flow Engineeringcited by 100
  3. 2018TRANX: A Transition-based Neural Abstract Syntax Parser for Semantic Parsing and Code Generationcited by 88
  4. 2025LocAgent: Graph-Guided LLM Agents for Code Localizationcited by 82
  5. 2024EvoCodeBench: An Evolving Code Generation Benchmark Aligned with Real-World Code Repositoriescited by 71
  6. 2024DevEval: A Manually-Annotated Code Generation Benchmark Aligned with Real-World Code Repositoriescited by 71
  7. 2024Evaluating Language Models for Efficient Code Generationcited by 69
  8. 2023CodeIE: Large Code Generation Models are Better Few-Shot Information Extractorscited by 67
  9. 2024DRAGIN: Dynamic Retrieval Augmented Generation based on the Information Needs of Large Language Modelscited by 63
  10. 2024CodexGraph: Bridging Large Language Models and Code Repositories via Code Graph Databasescited by 62
  11. 2024SelfCodeAlign: Self-Alignment for Code Generationcited by 61
  12. 2024Alibaba LingmaAgent: Improving Automated Issue Resolution via Comprehensive Repository Explorationcited by 58
  13. 2025OrcaLoca: An LLM Agent Framework for Software Issue Localizationcited by 43
  14. 2024REPOFUSE: Repository-Level Code Completion with Fused Dual Contextcited by 32
  15. 2024CodeDPO: Aligning Code Models with Self Generated and Verified Source Codecited by 32
  16. 2023AceCoder: Utilizing Existing Code to Enhance Code Generationcited by 25
  17. 2025LONGCODEU: Benchmarking Long-Context Language Models on Long Code Understandingcited by 13
  18. 2019Learning a Matching Model with Co-teaching for Multi-turn Response Selection in Retrieval-based Dialogue Systemscited by 7

Built on by

Cited by year (2026 to 7 Oct)

Citing papers per year: 2025: 6; 2026: 11.

17 papers.

Sort:

By area:

  1. 2026Code as Agent Harnesscited by 40
  2. 2025Retrieval-Augmented Code Generation: A Survey with Focus on Repository-Level Approachescited by 20
  3. 2025Beyond Synthetic Benchmarks: Evaluating LLM Performance on Real-World Class-Level Code Generationcited by 8
  4. 2026Codebase-Memory: Tree-Sitter-Based Knowledge Graphs for LLM Code Exploration via MCPcited by 6
  5. 2025Practical Code RAG at Scale: Task-Aware Retrieval Design Choices under Compute Budgetscited by 3
  6. 2026LARGER: Lexically Anchored Repository Graph Exploration and Retrievalcited by 2
  7. 2026CADIR: A Cross-Backend Editable Intermediate Representation for Agentic CAD Generationcited by 2
  8. 2025An Empirical Study on Strong-Weak Model Collaboration for Repo-level Code Generationcited by 1
  9. 2025Performance Evaluation of General Purpose Large Language Models for Basic Linear Algebra Subprograms Code Generationcited by 1
  10. 2025LSPRAG: LSP-Guided RAG for Language-Agnostic Real-Time Unit Test Generationcited by 1
  11. 2026ReCUBE: Evaluating Repository-Level Context Utilization in Code Generationcited by 1
  12. 2026Integrating Graphs, Large Language Models, and Agents: Reasoning and Retrievalcited by 1
5 more
  1. 2026DeepDiscovery: A Location-Inference Framework for Task-Level Repository Understandingcited by 1
  2. 2026Simulation Code Generation for Fluid Systems using Large Language Models: Benchmarking Models and Prompting Strategiescited by 1
  3. 2026Effective and Efficient Context Retrieval via Partial Dependency Graph for Repository-Level Code Generationcited by 1
  4. 2026ReproAgent: Contract-Guided Paper-to-Code Reproductioncited by 1
  5. 2026FeatLens: Feature-Guided Dynamic Code Graph Construction and Retrieval for Repository-Level Code Generationcited by 0

Similar, not cited

Close in wording, no citation either way

  1. 2025Code Graph Model (CGM): A Graph-Integrated Large Language Model for Repository-Level Software Engineering Tasks
  2. 2024LLM Agents Improve Semantic Code Search
  3. 2026CodeTeam: An LLM-Powered Multi-Agent Framework for Repository-Level Code Generation
  4. 2026Context-Augmented Code Generation Using Programming Knowledge Graphs
  5. 2025Requirements Development and Formalization for Reliable Code Generation: A Multi-Agent Vision
  6. 2025A Survey on Code Generation with LLM-based Agents
  7. 2025CodeVisionary: An Agent-based Framework for Evaluating Large Language Models in Code Generation
  8. 2025Guided Code Generation with LLMs: A Multi-Agent Framework for Complex Code Tasks