PulseAugur
实时 21:59:03
English(EN) The 20% of your AI agent's tool schemas that's pure cruft (and the one-liner to strip it)

AI 代理可以通过剥离工具模式冗余来减少令牌浪费

开发人员可以通过删除“title”、“$schema”和“additionalProperties”等不必要的字段,显著减少 AI 代理工具模式中的令牌浪费。这些字段通常占模式大小的 20%,但无助于 AI 选择正确的工具。提供了 Node.js/TypeScriptPython 的代码片段,可自动剥离这些冗余,从而在每次代理交互中节省大量成本。 AI

影响 通过最小化工具模式传输中的令牌使用量,降低了 AI 代理的运营成本。

排序理由 本文提供了一个实用的代码解决方案来优化 AI 代理工具模式,属于“工具”类别。

在 dev.to — LLM tag 阅读 →

AI 生成摘要 · Google Gemini · 来自 1 个来源。 我们如何撰写摘要 →

报道来源 [1]

  1. dev.to — LLM tag TIER_1 English(EN) · Zied Mnif ·

    AI代理工具模式中20%的纯粹冗余(以及剥离它的单行代码)

    <p>Your AI agent re-sends every tool's JSON schema on every single turn. A surprising chunk of that — often ~20% — is <strong>non-semantic cruft</strong>: tokens that carry zero tool-selection signal, billed on every request.</p> <p>I found this measuring the per-turn token cost …