代码优先工具调用优于JSON:14模型评测
JSON tool calling may be an unnecessary bottleneck for newer AI agents.
JSON tool calling may be an unnecessary bottleneck for newer AI agents.
JSON工具调用可能成为新一代AI代理不必要的瓶颈。
Capable models can orchestrate tools better by writing code than by emitting JSON calls.
能力强的模型通过编写代码来编排工具,比发出JSON调用更好。
This paper compares standard JSON calls with a code-first setup where the model writes one Python script that invokes the same tools.
本文比较了标准JSON调用与代码优先设置,其中模型编写一个Python脚本调用相同工具。
Across 14 models on a 309-task BFCL v4 subset, programmatic tool calling matched or beat JSON in 11, with GPT-5.6-Sol and Terra each improving by 10.6 percentage points.
在BFCL v4子集的309个任务上,对14个模型进行测试,程序化工具调用在11个模型中匹配或超过JSON,其中GPT-5.6-Sol和Terra各提高了10.6个百分点。
The gap gets clearer when one task needs many calls.
当一个任务需要多次调用时,差距变得更加明显。
For Claude Sonnet 5, JSON issued every required call through a fan-out of 70, then started dropping calls; at 100 calls it fell to 0% enumeration accuracy, while Python stayed at 100%.
对于Claude Sonnet 5,JSON通过70次扇出发出所有必要调用,然后开始丢弃调用;在100次调用时,枚举准确率降至0%,而Python保持在100%。
Sequential chains were faster for 13 of 14 models because several dependent calls can run inside one script instead of requiring another model turn after each tool result.
顺序链对14个模型中的13个更快,因为多个依赖调用可以在一个脚本内运行,而不需要在每次工具结果后等待另一个模型回合。
There is a boundary: several older GPT models got worse because they produced broken multiline Python, and the benchmark uses echo-return stubs rather than real APIs.
存在边界:几个较旧的GPT模型表现更差,因为它们生成了损坏的多行Python,且基准使用回声返回存根而非真实API。
– arxiv. org/abs/2608.06370
– arxiv.org/abs/2608.06370
Title: "The Bitter Lesson of Tool Calling"
标题:“工具调用的苦涩教训”
更进一步:量化金融体系
看懂新闻只是起点——沿量化金融路径,把它变成能交付的工程能力