RepoNav: From Snippet Retrieval to File-Centered Repository Navigation for Code Agents

📅 2026-09-08
📈 Citations: 0
✨ Influential: 0
📄 PDF
🤖 AI Summary
为解决代码代理在大型代码库中定位相关文件和函数的问题,RepoNav通过重组检索片段提供以文件为中心的导航框架,提高函数级定位精度。
📝 Abstract
Solving repository-level code tasks requires LLM-based agents to use code search tools to navigate large codebases and identify a small set of relevant files and functions. However, current retrieval tools typically return flat lists of isolated code snippets: such lists can surface relevant files, but provide insufficient structure for agents to distinguish the target function from semantically similar alternatives in the same file. We introduce RepoNav, a lightweight post-retrieval interface that reorganizes retrieved snippets into a file-centered navigation scaffold. By presenting compact structural cues and candidate targets, this scaffold guides on-demand file-structure browsing, helping agents compare sibling symbols before selecting a target function. Across diverse models on LocBench, RepoNav improves function-level localization and narrows the file-to-function gap. Controlled ablations demonstrate that these gains come from structured evidence organization rather than simply exposing additional file structure, and the approach also improves performance on a repository-level question-answering benchmark.
Problem

Research questions and friction points this paper is trying to address.

code search
LLM-based agents
file-centered navigation
code snippets
repository-level tasks
Innovation

Methods, ideas, or system contributions that make the work stand out.

file-centered navigation
post-retrieval interface
structural cues
code snippets reorganization
function localization
🔎 Similar Papers
No similar papers found.
💼 Related Jobs
No related jobs found.
H
Hongzheng Chai
School of Computer Science and Engineering, Beihang University
J
Jiakun Li
School of Computer Science and Engineering, Beihang University
H
Hongyue Yu
National College for Excellent Engineers, Beihang University
Yuan Yuan
Yuan Yuan
Assistant Professor in Computer Science at Boston College, previously at MIT.
Machine LearningComputer VisionMedical AIArtificial Intelligence