AI 中文总结
本研究评估仅名称目录路由在一次性代码搜索中的效果,发现其文件召回率优于固定词法查询,但增益来源不确定,且未证明能改善问题解决。
AI 中文摘要
找到正确的文件是编码智能体早期面临的挑战。我们测试语言模型是否能够遵循目录和文件名,以找到固定词法查询遗漏的带注释代码文件。在来自11个仓库的82个经审计问题中,固定于修复前提交状态下,仅名称目录路由在八个候选文件内恢复了0.465的金标准文件,相比之下FTS5为0.352,固定全文问题rg查询为0.245。相对于FTS5的配对增益为0.113(95%仓库聚类自助法区间为0.053至0.168)。在共享16K令牌上下文预算下,路由在55个完全对齐注释的案例中传递了0.443的注释行,而FTS5为0.246。在相同的八文件限制下,将路由与FTS5结合达到0.491的文件召回率,但其相对于单独路由的增益不确定。一项探索性的扁平路径控制达到0.572的召回率,同时每个问题使用24.6次模型调用,而路由为8.9次。路由平均每个问题耗时8.9秒;FTS5在0.9秒构建后每次查询耗时7毫秒。在该队列中,目录路由为一次性词法搜索添加了相关文件候选,但研究无法将增益归因于层次结构,也无法证明其改善了问题解决。
英文摘要
Finding the right files is an early challenge for coding agents. We test whether a language model can follow directory and file names to find annotated code files missed by fixed lexical queries. Across 82 audited issues from 11 repositories at pinned pre-fix commits, name-only directory routing recovered 0.465 of gold files within eight candidates, compared with 0.352 for FTS5 and 0.245 for a fixed full-issue rg query. The paired gain over FTS5 was 0.113 (95% repository-cluster bootstrap interval, 0.053 to 0.168). Under a shared 16K-token context budget, routing delivered 0.443 of annotated lines versus 0.246 for FTS5 on 55 cases with fully aligned annotations. At the same eight-file limit, combining routing with FTS5 reached 0.491 file recall, but its gain over routing alone was uncertain. An exploratory flat path control reached 0.572 recall while using 24.6 model calls per issue, compared with 8.9 for routing. Routing averaged 8.9 seconds per issue; FTS5 took 7 milliseconds per query after a 0.9-second build. On this cohort, directory routing added relevant file candidates to one-shot lexical search, but the study cannot attribute the gain to hierarchy or show that it improves issue resolution.