ChatPaper.aiChatPaper

開放權重大型語言模型中的約束代價:結構化輸出約束下工具調用抑制的實證研究

Constraint Tax in Open-Weight LLMs: An Empirical Study of Tool Calling Suppression Under Structured Output Constraints

June 24, 2026
作者: Fangzheng Li, Aimin Zhang, Chen Lv
cs.AI

摘要

工具調用與結構化輸出是現代Agent系統的兩項核心能力,然而它們在聯合部署情境下的交互作用仍未獲得充分理解。本文報告一個在生產環境Agent系統中觀察到的可重現現象:當同時啟用工具調用與JSON Schema約束時,多個開放權重模型會停止調用工具,儘管它們能高度遵循Schema規範。我們將此行為稱為「工具抑制」。透過跨越多個模型家族與部署設定的控制實驗,我們在聯合約束條件下持續重現工具抑制現象,而當分別獨立評估工具執行與Schema遵循時,兩者均能正常運作。進一步分析顯示,JSON Schema約束會被編譯為基於語法的Token遮罩,導致工具調用Token在解碼過程中變得不可及——這為觀察到的行為提供了實現層面的解釋。為解釋此現象,我們提出「約束優先級反轉」(CPI)假說,推測在多重約束並存時,Schema滿足可能主導行動選擇行為。需強調CPI是與觀察證據一致的行為假說,而非經驗證的內部機制。為減輕此問題,我們提出「透明兩階段執行」作為推論階段的策略,將工具執行與受Schema約束的響應生成解耦。實驗結果顯示,此方法能在無需重新訓練模型的情況下恢復工具調用,同時維持結構化輸出保證。這些發現表明,分別評估工具使用與結構化輸出可能忽略生產環境Agent系統中的重要可靠性問題。程式碼、資料與說明文件將釋出於 https://github.com/Fzsama/Constrain-Tax-26-06.git。
English
Tool Calling and Structured Output are two core capabilities of modern Agent systems, yet their interaction under joint deployment conditions remains insufficiently understood. This paper reports a reproducible phenomenon observed in a production Agent system: when Tool Calling and JSON Schema constraints are simultaneously enabled, multiple open-weight models cease invoking tools despite maintaining high schema compliance. We refer to this behavior as Tool Suppression. Through controlled experiments across multiple model families and deployment settings, we consistently reproduce Tool Suppression under joint constraints, while tool execution and schema compliance remain functional when evaluated independently. Further analysis reveals that JSON Schema constraints are compiled into grammar-based token masks, causing tool-call tokens to become unreachable during decoding. This provides an implementation-level explanation for the observed behavior. To interpret the phenomenon, we formulate the Constraint Priority Inversion (CPI) hypothesis, which suggests that schema satisfaction may dominate action-selection behavior under multiple simultaneous constraints. We present CPI as a behavioral hypothesis consistent with the observed evidence rather than a verified internal mechanism. To mitigate the problem, we propose Transparent Two-Pass Execution, an inference-time strategy that decouples tool execution from schema-constrained response generation. Experimental results show that this approach restores tool invocation while preserving structured output guarantees without requiring model retraining. These findings suggest that evaluating tool use and structured output separately may overlook important reliability issues in production Agent systems. Code, data, and docs will be released at https://github.com/Fzsama/Constrain-Tax-26-06.git.