首次揭示工具调用中错误累积的线性规律,保障AI代理可靠性。
Information Fidelity in Tool-Using LLM Agents: A Martingale Analysis of the Model Context Protocol
- 用鞅论分析工具调用中的误差传播,证明误差随步骤线性增长。
- 实测误差偏差始终在 $O(\sqrt{T})$ 范围内,无指数爆炸风险。
- 每9步重校准一次可有效控错,适合高可靠场景部署。
随着大语言模型驱动的AI代理越来越多地依赖外部工具进行高风险决策,一个关键的可靠性问题浮现:错误如何在连续工具调用中传播?本文首次建立针对模型上下文协议(MCP)代理的理论框架,证明累积失真呈线性增长,且高概率偏差被 $O(\sqrt{T})$ 限制。该集中性质确保系统行为可预测,排除了指数级失效模式。我们提出一种混合失真度量,结合离散事实匹配与连续语义相似性,并在序列工具交互中建立鞅集中界。在 Qwen2-7B、Llama-3-8B 与 Mistral-7B 上的实验验证了理论预测,显示实测失真严格遵循线性趋势,偏差始终处于 $O(\sqrt{T})$ 区间。关键发现包括:语义加权使失真降低80%,每约9步进行一次重校准即可有效控制误差。我们将这些集中保证转化为可信代理系统的可操作部署原则。
原文摘要 · Abstract (English)
As AI agents powered by large language models (LLMs) increasingly use external tools for high-stakes decisions, a critical reliability question arises: how do errors propagate across sequential tool calls? We introduce the first theoretical framework for analyzing error accumulation in Model Context Protocol (MCP) agents, proving that cumulative distortion exhibits linear growth and high-probability deviations bounded by $O(\sqrt{T})$. This concentration property ensures predictable system behavior and rules out exponential failure modes. We develop a hybrid distortion metric combining discrete fact matching with continuous semantic similarity, then establish martingale concentration bounds on error propagation through sequential tool interactions. Experiments across Qwen2-7B, Llama-3-8B, and Mistral-7B validate our theoretical predictions, showing empirical distortion tracks the linear trend with deviations consistently within $O(\sqrt{T})$ envelopes. Key findings include: semantic weighting reduces distortion by 80\%, and periodic re-grounding approximately every 9 steps suffices for error control. We translate these concentration guarantees into actionable deployment principles for trustworthy agent systems.
Thank you to arXiv for use of its open access interoperability. PaperDance 不是 arXiv 官方产品;中文卡片由大模型生成,请以原文为准。