mlsanityData to 7 Oct 2026

GraphCoder: Enhancing Repository-Level Code Completion via Code Context Graph-based Retrieval and Language Model

arXiv 2406.07003 ↗First posted 11 Jun 2024cs.SEcited by 40

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

Abstract (arXiv)

The performance of repository-level code completion depends upon the effective leverage of both general and repository-specific knowledge. Despite the impressive capability of code LLMs in general code completion tasks, they often exhibit less satisfactory performance on repository-level completion due to the lack of repository-specific knowledge in these LLMs. To address this problem, we propose GraphCoder, a retrieval-augmented code completion framework that leverages LLMs' general code knowledge and the repository-specific knowledge via a graph-based retrieval-generation process. In particular, GraphCoder captures the context of completion target more accurately through code context graph (CCG) that consists of control-flow, data- and control-dependence between code statements, a more structured way to capture the completion target context than the sequence-based context used in existing retrieval-augmented approaches; based on CCG, GraphCoder further employs a coarse-to-fine retrieval process to locate context-similar code snippets with the completion target from the current repository. Experimental results demonstrate both the effectiveness and efficiency of GraphCoder: Compared to baseline retrieval-augmented methods, GraphCoder achieves higher exact match (EM) on average, with increases of +6.06 in code match and +6.23 in identifier match, while using less time and space.

Key facts. Cited by 40 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 63 references that are in the map. First posted on arXiv 11 Jun 2024.

Builds on

31 of 63 references.

Closest ancestors · 3

Same direction, newest first

  1. 2024FT2Ra: A Fine-Tuning-Inspired Approach to Retrieval-Augmented Code Completion2 Apr
  2. 2022ReACC: A Retrieval-Augmented Code Completion Framework15 Mar
  3. 2021Retrieval Augmented Code Generation and Summarization26 Aug

Other references · 28

  1. 2017Attention Is All You Needcited by 59,932
  2. 2020Language Models are Few-Shot Learnerscited by 32,199
  3. 2023Llama 2: Open Foundation and Fine-Tuned Chat Modelscited by 12,865
  4. 2020Retrieval-Augmented Generation for Knowledge-Intensive NLP Taskscited by 9,160
  5. 2020Scaling Laws for Neural Language Modelscited by 6,411
  6. 2023Retrieval-Augmented Generation for Large Language Models: A Surveycited by 2,185
  7. 2023Code Llama: Open Foundation Models for Codecited by 2,105
  8. 2020CodeBERT: A Pre-Trained Model for Programming and Natural Languagescited by 1,286
  9. 2021GLM: General Language Model Pretraining with Autoregressive Blank Infillingcited by 1,026
  10. 2022GLM-130B: An Open Bilingual Pre-trained Modelcited by 837
  11. 2023Large Language Models Can Be Easily Distracted by Irrelevant Contextcited by 820
  12. 2019Generalization through Memorization: Nearest Neighbor Language Modelscited by 788
16 more
  1. 2020GraphCodeBERT: Pre-training Code Representations with Data Flowcited by 600
  2. 2024StarCoder 2 and The Stack v2: The Next Generationcited by 484
  3. 2022Large Language Models Struggle to Learn Long-Tail Knowledgecited by 452
  4. 2023Making Retrieval-Augmented Language Models Robust to Irrelevant Contextcited by 364
  5. 2023RepoCoder: Repository-Level Code Completion Through Iterative Retrieval and Generationcited by 357
  6. 2022UniXcoder: Unified Cross-Modal Pre-training for Code Representationcited by 355
  7. 2023CrossCodeEval: A Diverse and Multilingual Benchmark for Cross-File Code Completioncited by 181
  8. 2022Large Language Models Meet NL2Code: A Surveycited by 135
  9. 2023CodeGen2: Lessons for Training LLMs on Programming and Natural Languagescited by 124
  10. 2022Repository-Level Prompt Generation for Large Language Models of Codecited by 106
  11. 2022CoCoMIC: Code Completion By Jointly Modeling In-file and Cross-file Contextcited by 64
  12. 2023Unifying the Perspectives of NLP and Software Engineering: A Survey on Language Models for Codecited by 62
  13. 2023RepoFusion: Training Code Models to Understand Your Repositorycited by 40
  14. 2021Code Completion by Modeling Flattened Abstract Syntax Trees as Graphscited by 30
  15. 2023Structure-Aware Language Model Pretraining Improves Dense Retrieval on Structured Datacited by 23
  16. 2023Domain Adaptive Code Completion via Language Models and Decoupled Domain Databasescited by 19

Built on by

Cited by year (2026 to 7 Oct)

Citing papers per year: 2024: 5; 2025: 21; 2026: 14.

40 papers.

Sort:

By area:

  1. 2025Multi-SWE-bench: A Multilingual Benchmark for Issue Resolvingcited by 165
  2. 2025A Survey of Graph Retrieval-Augmented Generation for Customized Large Language Modelscited by 85
  3. 2024CodexGraph: Bridging Large Language Models and Code Repositories via Code Graph Databasescited by 62
  4. 2024SWE-bench-java: A GitHub Issue Resolving Benchmark for Javacited by 34
  5. 2025Code Graph Model (CGM): A Graph-Integrated Large Language Model for Repository-Level Software Engineering Taskscited by 27
  6. 2025What to Retrieve for Effective Retrieval-Augmented Code Generation? An Empirical Study and Beyondcited by 22
  7. 2025Graph-based Approaches and Functionalities in Retrieval-Augmented Generation: A Comprehensive Surveycited by 18
  8. 2026In Line with Context: Repository-Level Code Generation via Context Inliningcited by 18
  9. 2025GraphCodeAgent: Dual Graph-Guided LLM Agent for Retrieval-Augmented Repo-Level Code Generationcited by 17
  10. 2025CodeRAG: Finding Relevant and Necessary Knowledge for Retrieval-Augmented Repository-Level Code Completioncited by 12
  11. 2025Blueprint First, Model Second: A Framework for Deterministic LLM Workflowcited by 11
  12. 2025Towards an Understanding of Context Utilization in Code Intelligencecited by 10
28 more
  1. 2024CodeV: Issue Resolving with Visual Datacited by 9
  2. 2026SGAgent: Suggestion-Guided LLM-Based Multi-Agent Framework for Repository-Level Software Repaircited by 9
  3. 2024Understanding the Fundamental Design Decisions of Retrieval-Augmented Generation Systemscited by 7
  4. 2025RANGER -- Repository-Level Agent for Graph-Enhanced Retrievalcited by 7
  5. 2026AlignCoder: Aligning Retrieval with Target Intent for Repository-Level Code Completioncited by 7
  6. 2025Knowledge Augmented Complex Problem Solving with Large Language Models: A Surveycited by 6
  7. 2025AutoGraph-R1: End-to-End Reinforcement Learning for Knowledge Graph Constructioncited by 6
  8. 2025A Deep Dive into Retrieval-Augmented Generation for Code Completion: Experience on WeChatcited by 5
  9. 2025Impact-driven Context Filtering For Cross-file Code Completioncited by 5
  10. 2025Knowledge Graph Based Repository-Level Code Generationcited by 4
  11. 2025SelfRACG: Enabling LLMs to Self-Express and Retrieve for Code Generationcited by 2
  12. 2025TENET: One Step Toward Test-Driven Development for Repository-Level Code Generationcited by 2
  13. 2026CodeTeam: An LLM-Powered Multi-Agent Framework for Repository-Level Code Generationcited by 2
  14. 2026Function-Aware Fill-in-the-Middle as Mid-Training for Coding Agent Foundation Modelscited by 2
  15. 2024ENCO: Life-Cycle Management of Enterprise-Grade Copilotscited by 1
  16. 2025From Context to Intent: Reasoning-Guided Function-Level Code Completioncited by 1
  17. 2025Natural Language Summarization Enables Multi-Repository Bug Localization by LLMs in Microservice Architecturescited by 1
  18. 2026MHRC-Bench: A Multilingual Hardware Repository-Level Code Completion benchmarkcited by 1
  19. 2026Cross-Lingual Token Arbitrage: Optimizing Code Agent Context Windows via Local LLM Preprocessingcited by 1
  20. 2025Structure-Aware Corpus Construction and User-Perception-Aligned Metrics for Large-Language-Model Code Completioncited by 0
  21. 2025Is Implicit Knowledge Enough for LLMs? A RAG Approach for Tree-based Structurescited by 0
  22. 2026Hierarchical Embedding Fusion for Retrieval-Augmented Code Generationcited by 0
  23. 2026EvoRAG: Making Knowledge Graph-based RAG Automatically Evolve through Feedback-driven Backpropagationcited by 0
  24. 2026How Does Chunking Affect Retrieval-Augmented Code Completion? A Controlled Empirical Studycited by 0
  25. 2026XSearch: Explainable Code Search via Concept-to-Code Alignmentcited by 0
  26. 2026RCL: A Retrieval-Confidence Layer for Detecting Insufficient Context in Enterprise Retrieval-Augmented Code Generationcited by 0
  27. 2026StateTape: Action-Conditioned Evidence Lifecycle Modeling for Long-Horizon Coding Agentscited by 0
  28. 2026Chronos Enables Code Agents to Reason over Software Evolutioncited by 0

Similar, not cited

Close in wording, no citation either way

  1. 2025GRACE: Graph-Guided Repository-Aware Code Completion through Hierarchical Code Fusion
  2. 2025SaraCoder: Orchestrating Semantic and Structural Cues for Resource-Optimized Repository-Level Code Completion
  3. 2025Completion by Comprehension: Guiding Code Generation with Multi-Granularity Understanding
  4. 2024Repoformer: Selective Retrieval for Repository-Level Code Completion
  5. 2026Effective and Efficient Context Retrieval via Partial Dependency Graph for Repository-Level Code Generation
  6. 2025Retrieval-Augmented Code Generation: A Survey with Focus on Repository-Level Approaches
  7. 2024Context-Augmented Code Generation Using Programming Knowledge Graphs
  8. 2026Do Not Treat Code as Natural Language: Implications for Repository-Level Code Generation and Beyond