用自动生成环境与带纠错数据训练终端代理,提升大模型执行复杂任务能力。
TermiGen: High-Fidelity Environment and Robust Trajectory Synthesis for Terminal Agents
- 通过多智能体迭代生成可验证的终端环境和Docker容器
- 引入生成-评判机制主动注入错误,构建含纠错循环的轨迹数据
- 在终端基准测试中达31.3%通过率,超越开源与部分闭源模型
开放权重的大语言模型在执行复杂终端任务时仍面临重大挑战,主要受限于两个根本问题:其一,高质量可执行训练环境稀缺——从真实世界仓库合成的环境缺乏多样性和可扩展性,而由大模型生成的轨迹存在幻觉;其二,标准指令微调使用专家轨迹,但这些轨迹极少包含小型模型常见的简单错误,造成分布不匹配,使学生模型无法应对自身运行时故障。为弥合这些差距,我们提出TermiGen,一个端到端的管道,用于合成可验证的环境与鲁棒的专家轨迹。TermiGen首先通过迭代多智能体精炼循环生成功能有效的任务与Docker容器。随后,我们采用生成-评判协议,在轨迹收集过程中主动注入错误,合成富含纠错周期的数据。在该数据集上微调后,我们的TermiGen-Qwen2.5-Coder-32B在TerminalBench上达到31.3%的通过率,创下开放权重新纪录,显著优于现有基线,甚至超越如o4-mini等强大闭源模型。数据集已开源:https://github.com/ucsb-mlsec/terminal-bench-env。
原文摘要 · Abstract (English)
Executing complex terminal tasks remains a significant challenge for open-weight LLMs, constrained by two fundamental limitations. First, high-fidelity, executable training environments are scarce: environments synthesized from real-world repositories are not diverse and scalable, while trajectories synthesized by LLMs suffer from hallucinations. Second, standard instruction tuning uses expert trajectories that rarely exhibit simple mistakes common to smaller models. This creates a distributional mismatch, leaving student models ill-equipped to recover from their own runtime failures. To bridge these gaps, we introduce TermiGen, an end-to-end pipeline for synthesizing verifiable environments and resilient expert trajectories. Termi-Gen first generates functionally valid tasks and Docker containers via an iterative multi-agent refinement loop. Subsequently, we employ a Generator-Critic protocol that actively injects errors during trajectory collection, synthesizing data rich in error-correction cycles. Fine-tuned on this TermiGen-generated dataset, our TermiGen-Qwen2.5-Coder-32B achieves a 31.3% pass rate on TerminalBench. This establishes a new open-weights state-of-the-art, outperforming existing baselines and notably surpassing capable proprietary models such as o4-mini. Dataset is avaiable at https://github.com/ucsb-mlsec/terminal-bench-env.
Thank you to arXiv for use of its open access interoperability. PaperDance 不是 arXiv 官方产品;中文卡片由大模型生成,请以原文为准。