mlsanityData to 7 Oct 2026

Effective and Efficient Context Retrieval via Partial Dependency Graph for Repository-Level Code Generation

arXiv 2608.01927 ↗First posted 3 Aug 2026cs.SE cs.AIcited by 1

On the map: Retrieval-augmented generation → RAG for code

Abstract (arXiv)

LLM-based repository-level code generation aims to generate code using the context available in a software repository, requiring LLMs to reason over complex code dependencies. Due to limited context windows and insufficient repository-specific understanding, LLMs typically rely on retrieval-augmented generation (RAG) to incorporate relevant code. Early RAG approaches primarily employ similarity-based retrieval, which often fails to retrieve code snippets that the target function depends on. Recent work introduces graph-based retrieval to model such dependencies, but typically relies on manually designed rules and static global graphs, leading to limited flexibility and high construction and maintenance costs. In contrast, human developers collect helpful context by implicitly constructing a partial dependency graph and iteratively inspecting along it. Inspired by this behavior, we propose DyRetriever, an efficient context retrieval method via partial dependency graphs. DyRetriever uses an LLM to first select a set of entry-point functions and then perform multi-hop reasoning along the code dependency graph. During multi-hop reasoning, it uses the LLM's semantic understanding to validate whether a function can help generate the target function, eliminating manually designed rules and enabling flexibility across scenarios. Instead of statically constructing a global dependency graph, DyRetriever builds a partial graph on demand and discards it after use, reducing construction and maintenance costs. We integrate DyRetriever with a similarity-based code retriever to build DyCoder and evaluate it on CoderEval and DevEval. Experimental results show that DyCoder achieves relative Pass@1 improvements of 25.63% and 59.73% on CoderEval and DevEval, respectively, compared with existing RAG-based methods, while being 7.4x faster than baselines based on static dependency graph construction.

Key facts. Cited by 1 paper in the map (data through 7 Oct 2026). Placed in RAG for code, one of 15 directions in Retrieval-augmented generation. Builds on 26 of its 57 references that are in the map. First posted on arXiv 3 Aug 2026.

Builds on

26 of 57 references.

Closest ancestors · 4

Same direction, newest first

  1. 2025Retrieval-Augmented Code Generation: A Survey with Focus on Repository-Level Approaches6 Oct
  2. 2025GraphCodeAgent: Dual Graph-Guided LLM Agent for Retrieval-Augmented Repo-Level Code Generation14 Apr
  3. 2025What to Retrieve for Effective Retrieval-Augmented Code Generation? An Empirical Study and Beyond26 Mar
  4. 2022ReACC: A Retrieval-Augmented Code Completion Framework15 Mar

Other references · 22

  1. 2025Qwen3 Technical Reportcited by 8,195
  2. 2021Evaluating Large Language Models Trained on Codecited by 8,053
  3. 2023Efficient Memory Management for Large Language Model Serving with PagedAttentioncited by 5,767
  4. 2023SWE-bench: Can Language Models Resolve Real-World GitHub Issues?cited by 3,193
  5. 2024LiveCodeBench: Holistic and Contamination Free Evaluation of Large Language Models for Codecited by 1,906
  6. 2025Qwen3 Embedding: Advancing Text Embedding and Reranking Through Foundation Modelscited by 1,175
  7. 2024A Survey on Large Language Models for Code Generationcited by 646
  8. 2024BigCodeBench: Benchmarking Code Generation with Diverse Function Calls and Complex Instructionscited by 527
  9. 2024CodeAgent: Enhancing Code Generation with Tool-Integrated Agent Systems for Real-World Repo-level Coding Challengescited by 278
  10. 2023CrossCodeEval: A Diverse and Multilingual Benchmark for Cross-File Code Completioncited by 181
  11. 2024DevEval: A Manually-Annotated Code Generation Benchmark Aligned with Real-World Code Repositoriescited by 71
  12. 2024Alibaba LingmaAgent: Improving Automated Issue Resolution via Comprehensive Repository Explorationcited by 58
10 more
  1. 2024Dataflow-Guided Retrieval Augmentation for Repository-Level Code Completioncited by 40
  2. 2025Measuring Agents in Productioncited by 35
  3. 2024EvoCodeBench: An Evolving Code Generation Benchmark with Domain-Specific Evaluationscited by 33
  4. 2025ReCode: Reinforcing Code Generation with Reasoning-Process Rewardscited by 25
  5. 2021PyCG: Practical Call Graph Generation in Pythoncited by 16
  6. 2024DyPyBench: A Benchmark of Executable Python Softwarecited by 7
  7. 2026AlignCoder: Aligning Retrieval with Target Intent for Repository-Level Code Completioncited by 7
  8. 2024An Empirical Study of Large Language Models for Type and Call Graph Analysis in Python and JavaScriptcited by 3
  9. 2024ContextModule: Improving Code Completion via Repository-level Contextual Informationcited by 3
  10. 2025Reasoning as a Resource: Optimizing Fast and Slow Thinking in Code Generation Modelscited by 3

Built on by

Cited by year (2026 to 7 Oct)

Citing papers per year: 2026: 1.

1 paper.

Similar, not cited

Close in wording, no citation either way

  1. 2024Context-Augmented Code Generation Using Programming Knowledge Graphs
  2. 2024GraphCoder: Enhancing Repository-Level Code Completion via Code Context Graph-based Retrieval and Language Model
  3. 2026Context-Augmented Code Generation Using Programming Knowledge Graphs
  4. 2024On The Importance of Reasoning for Context Retrieval in Repository-Level Code Editing
  5. 2025GRACE: Graph-Guided Repository-Aware Code Completion through Hierarchical Code Fusion
  6. 2026Do Not Treat Code as Natural Language: Implications for Repository-Level Code Generation and Beyond
  7. 2026Adaptive Critical Token-Aware Retrieval for Repository-Level Code Generation
  8. 2026Reliable Graph-RAG for Codebases: AST-Derived Graphs vs LLM-Extracted Knowledge Graphs