用并行域代理探索替代线性遍历,提升跨模块代码修改定位效率
Exploration Structure in LLM Agents for Multi-File Change Localization

- 设计并行域代理机制,按领域分组并行搜索文件,突破线性遍历局限
- 在2025-2026新数据上,小模型达哈基类最高微F1,仅次于大模型Codex 5.5 High
- 适合需要跨模块定位的工程场景,尤其对复杂系统维护者有实用价值
软件工程工具越来越多依赖基于大模型的智能体定位需修改的文件以解决软件问题。现有方法多采用线性顺序探索(每步访问一个目录或文件),但这种结构与跨多个子系统的修改不匹配。本文对比线性探索与非线性、领域限定的并行代理探索。以SWE-Bench Pro为基准,聚焦Ansible项目,构建基于单一基线提交的持久会话评估框架。实验比较了无直接仓库访问的基线模型、带持久化Python REPL的单代理递归语言模型(RLM)以及使用Codex 5.5 High的外部CLI基线。采用小型哈基类模型的领域限定并行代理系统,在哈基类模型中取得最高微F1。在包含2025-2026年更新PRs的扩展基准上,该系统位列第二,仅次于更大的Codex 5.5 High。在原始的2020年精选版SWE-bench Pro上,大型纯文本模型(Sonnet)因预测少量文件而获得更高精确率,但召回率显著降低。此外还发现:文档演化是所有方法均未解决的隐含依赖;直接文件系统访问会加剧测试文件过预测;强制多代理协商并未带来明显收益且大幅增加令牌消耗。
原文摘要 · Abstract (English)
Software engineering tools increasingly rely on LLM based agents to localize files to change to resolve a software issue. Most AI agents explore repositories linearly, that is, visiting one directory or file per step. We postulate that this is a structural mismatch for changes that span several subsystems. We compare linear sequential exploration against non-linear, domain-scoped parallel agentic exploration. Using SWE Bench Pro as initial benchmark, we focus on ansible as an exemplar. We construct an approach for persistent-session evaluation of GitHub issues anchored at a single base commit. We compare our non-linear domain-agent file traversal system against a base LLM without direct repository access, a single agent Recursive Language Model (RLM) baseline with a persistent Python REPL and an external CLI baseline using Codex 5.5 High. Domain scoped parallel agent spawning with a small Haiku-class model achieves the highest micro F1 among Haiku class models by a large margin. Domain-agents is the second highest behind only the much larger Codex 5.5 High on our own expanded benchmark including over more recent PRs from 2025 and 2026. On the original, curated, 2020 SWE-bench Pro benchmark, a larger Sonnet plain LLM baseline attains higher micro F1 by predicting few files, leading to higher precision, but at significantly lower all gold recall. We also present three additional findings. First, documentation evolution is a latent dependency unresolved by any approach. Second, naive file system access can degrade localization driven by test-file over prediction. Lastly, forced multi-agent consultation does not measurably help and raises token cost substantially.
Thank you to arXiv for use of its open access interoperability. PaperDance 不是 arXiv 官方产品;中文卡片由大模型生成,请以原文为准。