Same Simulation, Different Evidence: Where Retrieved Tool Output Costs LLM Agents Accuracy

LLM Long Context Agent Tool Learning Agent Eval Benchmarks
2026年10月19日
即使能够计算出正确答案的大语言模型(LLM)智能体,仍可能给出错误回答。当前,智能体框架正日益倾向于将冗长的工具输出内容移出上下文窗口,转而将其保存至外部文件中,并仅在需要时通过检索或读取的方式调用这些文件。我们以一个真实科研工具——美国地质调查局(USGS)开发的广泛使用的地球化学模拟软件 PHREEQC 为例,探究这种做法在何种情况下会损害回答准确率。该软件生成的报告最长可达 846,800 个字符,且其运行具有完全确定性,因此报告中每一个打印出的数值均可被精确追溯。我们让各类智能体借助该工具回答 158 道经执行验证的多项选择题。结果发现:当智能体不再将模拟器报告全文载入上下文,而是改用“按章节索引检索”的方式读取报告时,GPT-5.1 和 GPT-5.2 的准确率分别下降了 11.3 分和 7.9 分;而 Claude Opus 4.6 与 Claude Sonnet 4.6 则未表现出任何可检测到的准确率损失。进一步重放全部 11,007 次有日志记录的模拟器调用后发现:两种 GPT 模型计算出目标关键数值的频率与之前基本一致;真正发生变化的是其作答所依据的证据来源。在采用检索机制的情况下,它们往往跳过原始报告,转而依赖自身生成的更高精度中间输出文件,并因四舍五入偏差而误选邻近选项——我们将此类错误称为“证据替换”(evidence substitution)。即便保持模拟过程完全不变,仅改变检索策略仍会使 GPT-5.2 的准确率额外下降 9.4 分。对于 GPT-5.4,尽管其正确模拟的频次显著提升,从而掩盖了约 10 分的“证据使用能力”损失,最终导致净准确率变化微小、难以与零区分。若在检索过程中明确标示出权威输出(即指定应采信的报告段落),相较于普通检索,三款 GPT 模型的准确率均可提升 6.3 至 7.9 分;对 GPT-5.1 和 GPT-5.2 而言,将长度适配的输出内容直接内联(inline)进上下文亦能达到同等效果,但单纯要求模型“正确四舍五入”则并无助益。综上,智能体框架在上下文管理方面的设计决策,不应仅以其最终准确率为评判标准,更应深入考察准确率损失究竟发生于哪个具体环节。
LLM agents that compute the right answer can still answer wrongly. Agent harnesses increasingly keep long tool outputs out of the context window, saving them to files that the agent searches or reads on demand. We ask where this costs accuracy with a real scientific tool: PHREEQC, a widely used geochemistry simulator from the USGS, whose reports reach 846.8k characters and whose determinism lets every printed value be traced. Agents use it to answer 158 execution-verified multiple-choice items. When agents read the simulator's report through a section index rather than in context, GPT-5.1 and GPT-5.2 lose 11.3 and 7.9 points of accuracy, while Claude Opus 4.6 and Claude Sonnet 4.6 show no detectable cost. Re-running all 11,007 logged simulator calls shows that both GPT models compute the keyed value about as often as before; what changes is the evidence they answer from. Under retrieval they often skip the report, answer from their own higher-precision output files, and misround to a neighboring option, a failure we call evidence substitution. With the simulation held fixed, retrieval still costs GPT-5.2 9.4 points. For GPT-5.4, more frequent correct simulations mask an evidence-use loss of about ten points, leaving a net change indistinguishable from zero. Naming the authoritative output raises accuracy by 6.3-7.9 points over plain retrieval for the three GPT models; for GPT-5.1 and GPT-5.2, inlining outputs that fit works as well, while asking for correct rounding does not. Context-management choices in agent harnesses should be judged by where accuracy is lost, not only by final accuracy.
许愿