交接税:LLM代理中延续非原生轨迹
其他资讯 · 2026/08/27
编码代理在长时间运行的任务中涉及多次模型调用、工具使用和代码编辑。随着这些运行的展开,用户面临成本与质量的权衡:当较便宜的模型遇到困难时升级到更强的模型,或在困难推理完成后降级。每次切换都要求接收者继续由另一个模型产生的非原生轨迹。我们研究了这种交接如何影响质量和成本,以及接收者继承的轨迹信息的变化如何改变结果。使用来自Claude和GPT家族的成对低成本低能力(LC)和高成本高能力(HC)模型,我们改变交接方向、时机和接口,比较全轨迹转移、压缩和移除轨迹同时保留仓库状态。在两个模型家族中,全轨迹升级恢复了不到LC到HC质量差距的一半,同时产生了显著的额外成本。我们将这种成本质量惩罚称为交接税。相比之下,降级提供了有利的成本质量点。有趣的是,首选接口也随方向反转:减少LC模型轨迹信息提高了升级质量,而移除HC模型轨迹降低了降级质量。
该论文系统研究了LLM代理中模型切换的交接税现象,揭示了全轨迹升级的低效和降级的优势,并发现接口偏好随方向反转,为实际部署提供了重要指导。
Coding agents perform long-running tasks spanning dozens of model calls, tool uses, and code edits. As these runs unfold, users face a practical cost-quality trade-off: escalating to a stronger model when a cheaper one struggles, or downshifting once the hard reasoning is complete. Each switch requires the receiver to continue a non-native trajectory produced by another model. We study how this handoff affects quality and cost, and how varying the trajectory information inherited by the receiver changes the outcome. Using pairs of low-cost, low-capability (LC) and high-cost, high-capability (HC) models from the Claude and GPT families, we vary handoff direction, timing, and interface, comparing full-trajectory transfer, compaction, and trajectory removal while preserving the repository state. Across both model families, full-trajectory escalation recovers less than half of the LC-to-HC quality gap while incurring a substantial cost premium. We term this cost-quality penalty the handoff tax. By contrast, downshift offers a favorable cost-quality point. Interestingly, the preferred interface also reverses with direction: reducing LC-model trajectory information improves escalation quality, whereas removing the HC-model trajectory reduces downshift quality.