测试大模型在使用临时接口凭证时的合规性,发现主流模型仍频繁出错。
ContractBench: Can LLM Agents Preserve Observation Contracts?

- 设计双轴任务基准,检测凭证过期和字节损坏两类失效
- 38个模型中最高仅77.8%正确率,大模型也不可靠
- 失败分类可直接用于优化模型,提升7.1个百分点
工具增强型大模型调用API时,会生成如预签名链接、会话令牌等观察契约——其后续使用受外部系统约束。我们发现,保持契约有效性(时间时效性)和完整性(字节无损)是涌现且易退化的特性:既非通用工具使用能力的自然结果,也未随模型规模或版本提升而稳定改善。为此,我们提出ContractBench,一个包含33个双轴任务的基准,专门检测两类现有基准未覆盖的失效模式:有效性失败(使用已过期的契约)与完整性失败(在观察到动作路径中破坏契约字节)。评估采用确定性与程序化设计,虚拟时钟控制时间,SHA-256哈希验证完整性。每个结果根据真实API规范标注失败类型。评估38个模型,报告四项发现:(i) 无一模型达到80%通过率,Claude-Opus-4.6以77.8%领先,表明前沿模型仍无法保证契约合规;(ii) Qwen 3.5系列在4B(0%)与9B(56.6%)间出现显著能力断崖,397B-A17B提升至70.7%,说明断崖处涌现的是中途约束而非工具调用能力;(iii) GPT-5家族呈现非单调缩放:代理后训练可能因讨好倾向导致合规性下降;(iv) 我们的失败分类作为上下文奖励信号可使42对GPT-5.1失败案例提升7.1个百分点。
原文摘要 · Abstract (English)
Tool-augmented LLM agents call APIs whose intermediate outputs, such as presigned URLs, session tokens, and OAuth state parameters, are observation contracts: artifacts whose later use is constrained by the external system that produced them. We show that observation contract compliance (preserving the temporal validity and byte-level integrity) is an emergent, regression-prone capability: it is neither guaranteed by general tool-use ability nor consistently improved by larger or newer models. To measure this, we introduce ContractBench, a benchmark of 33 dual-axis tasks that probe two orthogonal failure modes no existing benchmark evaluates: validity failures (using an artifact after expiry) and integrity failures (corrupting an artifact's bytes through the observation-to-action pipeline). Our evaluation is deterministic and programmatic, with a virtual clock controlling time and SHA-256 hashes verifying byte integrity. We assign each outcome a failure label drawn from real-world API specifications. We evaluate 38 models and report four findings: (i) no evaluated model clears 80%, with Claude-Opus-4.6 leading at 77.8%, revealing that current frontier models still fail to comply with observation contracts; (ii) a sharp within-family capability cliff in Qwen 3.5 between 4B (0%) and 9B (56.6%), smoothing to 70.7% at 397B-A17B: what emerges across the cliff is mid-trajectory restraint, not tool-call competence; (iii) non-monotonic scaling across the GPT-5 family: agentic post-training can erode compliance through sycophancy-driven regression; (iv) our failure taxonomy works as an actionable in-context reward signal, yielding +7.1 pp on 42 paired GPT-5.1 failures.
Thank you to arXiv for use of its open access interoperability. PaperDance 不是 arXiv 官方产品;中文卡片由大模型生成,请以原文为准。