Search papers, labs, and topics across Lattice.
To address the "file-to-function gap" where code agents identify relevant files but fail to pinpoint target functions among sibling symbols, the authors create RepoNav, a lightweight post-retrieval interface that converts flat snippet lists into file-centered navigation scaffolds. This setup equips agents with compact structural cues that enable on-demand symbol browsing to systematically disambiguate semantically similar functions within a file. Evaluated on LocBench and repo-level QA benchmarks, RepoNav consistently boosts function-level localization across diverse LLMs, with ablations showing that structured organization drives the performance gains rather than added context.
Standard code retrieval reliably lands agents in the right file but leaves them blind to the right function—a gap closed by turning flat snippet results into structured, navigable file scaffolds.
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.