跳到正文
Reddit · r/LocalLLaMA· /u/Main-Fisherman-2075·· 9 小时前AI 评分57

Tool calling 本质仍是提示词文本:Qwen3 chat template 实拆与网关工具循环实践

Tool calling is still just a prompt

来源与原文

Reddit · r/LocalLLaMA

作者:/u/Main-Fisherman-2075

发布时间:(北京时间)

阅读原始来源 · reddit.com ↗
完整链接与内容说明

https://www.reddit.com/r/LocalLLaMA/comments/1xgbkks/tool_calling_is_still_just_a_prompt/

本站目前仅有 AI 导读与摘要,未展示原文正文;技术细节、代码和完整结论请查看原始来源。

AI 导读

作者在自建网关时发现 tool calling 本质仍是提示词里的普通文本。Qwen3 的 chat template 会把工具 JSON 放进 system prompt 的 <tools> 标签之间,模型以普通 token 写出 <tool_call> 块,由 vLLM、llama.cpp 或托管 API 解析成 tool_calls 字段,结果再以 <tool_response> 标签的用户消息回传;闭源模型同理,Anthropic 文档写明 Claude Opus 5.5 会在工具定义前加 286 token 的隐藏 system prompt。

来源:Reddit · r/LocalLLaMA · reddit.com