推测性分叉:将空闲等待转化为仓库环境设置的并行探索
Speculative Forking: Turning Idle Wait into Parallel Exploration for Repository Environment Setup
AI总结:
针对LLM环境设置智能体顺序试错导致的速度慢、探索路径少的问题,提出SpecBuild系统,通过策略级与命令级并行推测分叉,在Multi-Docker-Eval上提升成功率并缩短设置时间。
摘要:
开发者使用软件项目前需先使其运行,这通常需要安装正确的语言运行时、系统包、构建工具及测试命令。近期基于大语言模型(LLM)的智能体通过检查仓库、编写设置脚本、运行脚本并修复错误来自动化环境设置,但这些智能体仍遵循顺序试错循环:尝试一条设置路径,等待缓慢命令完成,观察失败后才决定下一步尝试。由于环境命令运行耗时较长,这种顺序工作流导致设置缓慢,且每次仅能探索一条路径。本文提出SpecBuild,一种基于LLM的环境设置系统,通过推测性分叉实现更快、更成功的设置。SpecBuild并行探索候选设置分支,返回首个成功提交的环境并丢弃其余分支,其设计应用于两个粒度层面:策略级分叉探索替代设置路径,如不同基础镜像和依赖策略;命令级分叉预测运行命令的失败,并在失败被观测前准备修复分支。我们在Multi-Docker-Eval上评估SpecBuild,该基准涵盖40个仓库的334项任务及9种编程语言。在三种骨干模型下,SpecBuild相比最强基线将成功率提升6.4至12.0个百分点,同时平均设置时间减少22.4%至41.6%。这些结果表明,基于LLM的环境设置无需在速度与可靠性间权衡:并行推测探索可使智能体既更快又更成功。
英文摘要:
Before developers can use a software project, they must first get it to run. This often requires installing the right language runtime, system packages, build tools, and test commands. Recent LLM-based agents automate environment setup by inspecting a repository, writing setup scripts, running them, and repairing the resulting errors. However, these agents still follow a sequential trial-and-error loop: they try one setup route, wait for slow commands to finish, observe the failure, and only then decide what to try next. Because environment commands often take long to run, this sequential workflow makes setup slow and limits exploration to one route at a time. We present SpecBuild, an LLM-based environment setup system designed to be both faster and more successful through speculative forking. SpecBuild explores candidate setup branches in parallel, returns the first committed environment, and discards the rest. It applies this design at two granularities: strategy-level forking explores alternative setup routes, such as different base images and dependency policies, while command-level forking predicts failures of running commands and prepares repair branches before those failures are observed. We evaluate SpecBuild on Multi-Docker-Eval, covering 334 tasks from 40 repositories and 9 programming languages. Across three backbone models, SpecBuild improves the success rate by 6.4 to 12.0 percentage points over the strongest baseline, while reducing average setup time by 22.4% to 41.6%. These results show that LLM-based environment setup need not trade speed for reliability: parallel speculative exploration can make agents both faster and more successful.
机构、总结、中文摘要均由AI分析而来,可能存在错误,请以论文正文为准。