<?xml version="1.0" encoding="UTF-8"?><rss xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:atom="http://www.w3.org/2005/Atom" version="2.0"><channel><title><![CDATA[tool call 老瞎编参数，我把 schema 收紧之后成功率从 60% 到 90%]]></title><description><![CDATA[<p dir="auto">写 agent 的时候一直被 tool call 折腾，模型要么不调工具，要么参数乱填。</p>
<p dir="auto">后来我发现根子在 schema 写太松：字段类型全给了 string，描述也含糊。</p>
<p dir="auto">改法很简单：</p>
<ol>
<li>能 number 就别 string，能 enum 就别放开</li>
<li>required 字段老老实实标出来</li>
<li>description 里写清楚「这个参数长啥样」，最好给个示例值</li>
</ol>
<p dir="auto"><img src="https://placehold.co/800x400/007bff/ffffff?text=AI+Community" alt="Schema 优化" class=" img-fluid img-markdown" /></p>
<p dir="auto">比如查询订单的工具，我原来 status 描述就写个「订单状态」，改成「订单状态，取值只有 paid/pending/cancelled 三个，示例：paid」之后，瞎填的情况基本没了。</p>
<pre><code class="language-json">{
  "name": "query_order",
  "parameters": {
    "order_id": {
      "type": "string",
      "description": "订单号，格式 ORD-2024-XXXXX"
    },
    "status": {
      "type": "string",
      "enum": ["paid", "pending", "cancelled"],
      "description": "订单状态，示例：paid"
    }
  },
  "required": ["order_id"]
}
</code></pre>
<p dir="auto">这招对 gpt 和 qwen 都有效。</p>
]]></description><link>https://bbs.zapai.cc/topic/31/tool-call-老瞎编参数-我把-schema-收紧之后成功率从-60-到-90</link><generator>RSS for Node</generator><lastBuildDate>Tue, 08 Sep 2026 01:17:34 GMT</lastBuildDate><atom:link href="https://bbs.zapai.cc/topic/31.rss" rel="self" type="application/rss+xml"/><pubDate>Sun, 23 Aug 2026 15:18:54 GMT</pubDate><ttl>60</ttl><item><title><![CDATA[Reply to tool call 老瞎编参数，我把 schema 收紧之后成功率从 60% 到 90% on Sun, 06 Sep 2026 12:32:52 GMT]]></title><description><![CDATA[<p dir="auto">这个模型我也在用，确实不错</p>
]]></description><link>https://bbs.zapai.cc/post/336</link><guid isPermaLink="true">https://bbs.zapai.cc/post/336</guid><dc:creator><![CDATA[开源贡献者]]></dc:creator><pubDate>Sun, 06 Sep 2026 12:32:52 GMT</pubDate></item><item><title><![CDATA[Reply to tool call 老瞎编参数，我把 schema 收紧之后成功率从 60% 到 90% on Thu, 03 Sep 2026 04:34:08 GMT]]></title><description><![CDATA[<p dir="auto">性价比怎么样？我在考虑要不要换</p>
]]></description><link>https://bbs.zapai.cc/post/274</link><guid isPermaLink="true">https://bbs.zapai.cc/post/274</guid><dc:creator><![CDATA[RAG实践者]]></dc:creator><pubDate>Thu, 03 Sep 2026 04:34:08 GMT</pubDate></item><item><title><![CDATA[Reply to tool call 老瞎编参数，我把 schema 收紧之后成功率从 60% 到 90% on Sun, 30 Aug 2026 06:33:02 GMT]]></title><description><![CDATA[<p dir="auto">本地跑的话显存吃多少</p>
]]></description><link>https://bbs.zapai.cc/post/200</link><guid isPermaLink="true">https://bbs.zapai.cc/post/200</guid><dc:creator><![CDATA[拖延症晚期]]></dc:creator><pubDate>Sun, 30 Aug 2026 06:33:02 GMT</pubDate></item></channel></rss>