arXivDaily arXiv每日学术速递 周一至周五更新
arXiv 2605.16352cs.IRcs.AIcs.LG
收藏

LARGER: 词典锚定的仓库图探索与检索

LARGER: Lexically Anchored Repository Graph Exploration and Retrieval

Emory University(埃默里大学)

Yuntong Hu, Tongli Su, Liang Zhao, Bowen Zhu, Hasibul Haque

AI总结:

LARGER通过词典锚定的结构化定位方法提升代码仓库文件定位精度,实现测试生成和代码库理解任务的性能提升。

摘要:

仓库级别的编码代理必须首先定位与任务相关的文件和符号;此阶段的失败会影响从补丁生成到测试编写和代码库问答的下游目标。现有代理主要通过词汇搜索导航仓库,常遗漏结构关系如导入、调用链、类型层次和代码-测试链接。基于图的检索可恢复此类依赖,但现有方法常需要单独的图工具或遍历阶段,打断代理的交互循环。我们正式将仓库上下文定位定义为词典锚定的结构化定位,其成功取决于将词汇匹配转化为高精度的结构入口点,并在代理现有搜索循环中暴露最有用的置信度过滤局部邻域。我们引入LARGER(词典锚定的仓库图探索与检索),一种以词汇锚定的主动集检索框架,从词汇匹配开始,将其对齐到图锚点,并在代理现有搜索循环中执行置信度过滤的局部扩展。LARGER直接集成到现有CLI编码代理中,无需外部图数据库或专用图接口。在四个涵盖定位、测试生成和代码库理解的基准测试中,LARGER在LocBench上通过调整超参数将文件级Acc@5提升13.9点,即使在固定超参数下仍比最强基线提升11.8点,并在MuLocBench、SWE-Atlas测试编写和SWE-Atlas代码库问答任务上提供一致的提升。

英文摘要:

Repository-level coding agents must first localize the files and symbols relevant to a task; failures at this stage can cascade across downstream objectives ranging from patch generation to test writing and codebase question answering. Existing agents navigate repositories primarily through lexical search, often missing structural relations such as imports, call chains, type hierarchies, and code-test links. Graph-based retrieval can recover such dependencies, but existing approaches often require separate graph tools or traversal stages that fragment the agent's interaction loop. We formalize repository context localization as Lexically Anchored Structural Localization, where success depends on turning lexical matches into high-precision structural entry points and exposing the most useful confidence-filtered local neighborhoods within the agent's existing search loop. We introduce LARGER (Lexically Anchored Repository Graph Exploration and Retrieval), a lexically anchored active-set retrieval framework that starts from lexical matches, aligns them to graph anchors, and performs confidence-filtered local expansion within the agent's existing search loop. LARGER integrates directly into existing CLI coding agents without requiring external graph databases or specialized graph interfaces. Across four benchmarks spanning localization, test generation, and codebase understanding, LARGER improves file-level Acc@5 on LocBench by +13.9 points with tuned hyperparameters and still gains +11.8 points with fixed hyperparameters over the strongest baseline, while delivering consistent gains on MuLocBench, SWE-Atlas Test Writing, and SWE-Atlas Codebase QA.

机构、总结、中文摘要均由AI分析而来,可能存在错误,请以论文正文为准。

↑