自动优化语言模型的运行框架,提升代码生成效率与稳定性。
HARBOR: Automated Harness Optimization
- 用贝叶斯优化自动调参,兼顾成本与安全约束。
- 在真实编码任务中,性能优于人工调参四轮结果。
- 适用于任何有固定参数空间的智能体框架,通用性强。
长时序语言模型代理的复杂性主要来自其运行框架(harness),而非底层模型本身:包括上下文压缩、工具缓存、语义记忆、轨迹复用、推测性工具预测以及模型与沙箱环境的绑定机制。本文认为框架设计是核心机器学习问题,当配置空间超过少量比特后,自动化配置搜索将超越人工堆叠。为此,提出一种混合变量、异质成本的受约束噪声贝叶斯优化框架,引入冷启动修正奖励和后验概率安全检查,并构建参考求解器HARBOR,其基于块可加的SAAS代理模型、多保真度成本感知采集策略与TuRBO信任区域。在生产级代码生成代理上,通过四轮人工调优与端到端HARBOR对比实验验证了有效性。该方法对任务类型无偏好,仅需有限参数空间与可复现任务集即可适用。
原文摘要 · Abstract (English)
Long-horizon language-model agents are dominated, in lines of code and in operational complexity, not by their underlying model but by the harness that wraps it: context compaction, tool caching, semantic memory, trajectory reuse, speculative tool prediction, and the glue that binds the model to a sandboxed execution environment. We argue that harness design is a first-class machine-learning problem and that automated configuration search dominates manual stacking once the flag space exceeds a handful of bits. We defend this claim in two steps. First, we formalize automated harness optimization as constrained noisy Bayesian optimization over a mixed-variable, cost-heterogeneous configuration space with cold-start-corrected rewards and a posterior chance-constrained safety check, and give a reference solver, HARBOR (Harness Axis-aligned Regularized Bayesian Optimization Routine), built from a block-additive SAAS surrogate, multi-fidelity cost-aware acquisition, and TuRBO trust regions. Second, we instantiate the problem in a flag-gated harness over a production coding agent and report a controlled four-round manual-tuning case study against a fixed task suite and an end-to-end HARBOR run. The formulation itself is task-class agnostic: the configuration space, reward correction, acquisition, and safety check apply to any agent harness with a bounded flag space and a reproducible task suite.
Thank you to arXiv for use of its open access interoperability. PaperDance 不是 arXiv 官方产品;中文卡片由大模型生成,请以原文为准。