RANGER -- Repository-Level Agent for Graph-Enhanced Retrieval
Not on the map. Why?
Abstract (arXiv)
General-purpose automated software engineering (ASE) includes tasks such as code completion, retrieval, repair, QA, and summarization. These tasks require a code retrieval system that can handle specific queries about code entities, or code entity queries (for example, locating a specific class or retrieving the dependencies of a function), as well as general queries without explicit code entities, or natural language queries (for example, describing a task and retrieving the corresponding code). We present RANGER, a repository-level code retrieval agent designed to address both query types, filling a gap in recent works that have focused primarily on code-entity queries. We first present a tool that constructs a comprehensive knowledge graph of the entire repository, capturing hierarchical and cross-file dependencies down to the variable level, and augments graph nodes with textual descriptions and embeddings to bridge the gap between code and natural language. RANGER then operates on this graph through a dual-stage retrieval pipeline. Entity-based queries are answered through fast Cypher lookups, while natural language queries are handled by MCTS-guided graph exploration. We evaluate RANGER across four diverse benchmarks that represent core ASE tasks including code search, question answering, cross-file dependency retrieval, and repository-level code completion. On CodeSearchNet and RepoQA it outperforms retrieval baselines that use embeddings from strong models such as Qwen3-8B. On RepoBench, it achieves superior cross-file dependency retrieval over baselines, and on CrossCodeEval, pairing RANGER with BM25 delivers the highest exact match rate in code completion compared to other RAG methods.
Key facts. Cited by 7 papers in the map (data through 14 Oct 2026). Builds on 37 of its 56 references that are in the map. First posted on arXiv 27 Sep 2025.
Builds on
37 of 56 references.
References · 37
- 2021Evaluating Large Language Models Trained on Codecited by 8,320
- 2020Dense Passage Retrieval for Open-Domain Question Answeringcited by 3,824
- 2023Code Llama: Open Foundation Models for Codecited by 2,139
- 2022Competition-Level Code Generation with AlphaCodecited by 1,462
- 2020CodeBERT: A Pre-Trained Model for Programming and Natural Languagescited by 1,310
- 2025Qwen3 Embedding: Advancing Text Embedding and Reranking Through Foundation Modelscited by 1,261
- 2021Unsupervised Dense Information Retrieval with Contrastive Learningcited by 1,216
- 2024DeepSeek-Coder: When the Large Language Model Meets Programming -- The Rise of Code Intelligencecited by 1,181
- 2022CodeGen: An Open Large Language Model for Code with Multi-Turn Program Synthesiscited by 885
- 2021CodeXGLUE: A Machine Learning Benchmark Dataset for Code Understanding and Generationcited by 744
- 2019CodeSearchNet Challenge: Evaluating the State of Semantic Code Searchcited by 654
- 2024StarCoder 2 and The Stack v2: The Next Generationcited by 502
25 more
- 2022UniXcoder: Unified Cross-Modal Pre-training for Code Representationcited by 361
- 2018code2vec: Learning Distributed Representations of Codecited by 250
- 2017A Survey of Machine Learning for Big Code and Naturalnesscited by 221
- 2017Learning to Represent Programs with Graphscited by 220
- 2023CrossCodeEval: A Diverse and Multilingual Benchmark for Cross-File Code Completioncited by 183
- 2018code2seq: Generating Sequences from Structured Representations of Codecited by 179
- 2021Retrieval Augmented Code Generation and Summarizationcited by 149
- 2022ReCode: Robustness Evaluation of Code Generation Modelscited by 103
- 2024RepoGraph: Enhancing AI Software Engineering with Repository-level Code Graphcited by 91
- 2025LocAgent: Graph-Guided LLM Agents for Code Localizationcited by 86
- 2023Enhancing Conversational Search: Large Language Model-Aided Informative Query Rewritingcited by 69
- 2022CoCoMIC: Code Completion By Jointly Modeling In-file and Cross-file Contextcited by 65
- 2024CodexGraph: Bridging Large Language Models and Code Repositories via Code Graph Databasescited by 65
- 2019TreeGen: A Tree-Based Transformer Architecture for Code Generationcited by 58
- 2025OrcaLoca: An LLM Agent Framework for Software Issue Localizationcited by 45
- 2024Dataflow-Guided Retrieval Augmentation for Repository-Level Code Completioncited by 40
- 2024GraphCoder: Enhancing Repository-Level Code Completion via Code Context Graph-based Retrieval and Language Modelcited by 40
- 2024RepoQA: Evaluating Long Context Code Understandingcited by 35
- 2024REPOFUSE: Repository-Level Code Completion with Fused Dual Contextcited by 32
- 2025Code Graph Model (CGM): A Graph-Integrated Large Language Model for Repository-Level Software Engineering Taskscited by 27
- 2024CATCODER: Repository-Level Code Generation with Relevant Code and Type Contextcited by 8
- 2021Enriching Query Semantics for Code Search with Reinforcement Learningcited by 7
- 2025Enhancing Large Language Models with Reward-guided Tree Search for Knowledge Graph Question and Answeringcited by 3
- 2025Repository-level Code Search with Neural Retrieval Methodscited by 1
- 2025Structural Code Search using Natural Language Queriescited by 1
Built on by
Citing papers per year: 2025: 1; 2026: 6.
7 papers.
- 2025Retrieval-Augmented Code Generation: A Survey with Focus on Repository-Level Approachescited by 23
- 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
- 2026How Much Static Structure Do Code Agents Need? A Study of Deterministic Anchoringcited by 1
- 2026Deep Agentic Search for Repository-Level Code Question Answering: An Empirical Studycited by 1
- 2026SemChunk-C: Semantic Segmentation for C Codecited by 0
- 2026PatchHolmes: Agentic Patch Retrieval via Listwise Selectioncited by 0
- 2026PatchHolmes: Agentic Patch Retrieval via Listwise Selection30 Sep 2026
- 2026Deep Agentic Search for Repository-Level Code Question Answering: An Empirical Study2 Aug 2026
- 2026How Much Static Structure Do Code Agents Need? A Study of Deterministic Anchoring25 Jun 2026
- 2026SemChunk-C: Semantic Segmentation for C Code12 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
- 2025Retrieval-Augmented Code Generation: A Survey with Focus on Repository-Level Approaches6 Oct 2025
Similar, not cited
Close in wording, no citation either way
- 2026Reliable Graph-RAG for Codebases: AST-Derived Graphs vs LLM-Extracted Knowledge Graphs
- 2026Do Not Treat Code as Natural Language: Implications for Repository-Level Code Generation and Beyond
- 2026Effective and Efficient Context Retrieval via Partial Dependency Graph for Repository-Level Code Generation
- 2026Context-Augmented Code Generation Using Programming Knowledge Graphs
- 2026CORE-Bench: A Comprehensive Benchmark for Code Retrieval in the Era of Agentic Coding
- 2025GRACE: Graph-Guided Repository-Aware Code Completion through Hierarchical Code Fusion
- 2025SaraCoder: Orchestrating Semantic and Structural Cues for Resource-Optimized Repository-Level Code Completion
- 2025CodeRAG: Finding Relevant and Necessary Knowledge for Retrieval-Augmented Repository-Level Code Completion