AI Agents Lose Accuracy When Tool Output Moves to Files
In a test with the USGS simulator PHREEQC, GPT-5.1 and GPT-5.2 lost up to 11 points when reports were read from files, often answering from their own output instead. Claude showed no cost.
TL;DR
- In a geochemistry test, delivering tool output via files cost GPT-5.1 and GPT-5.2 11.3 and 7.9 accuracy points; two Claude models showed no detectable cost [^1].
- The GPT models still computed the right value but answered from their own files instead of the simulator's report, which the authors call evidence substitution [^1].
Background
When a tool returns a long output, such as a log, search results or a simulation report, an agent harness can paste it into the context or save it to a file the agent reads on demand [^1]. Files save context space, but earlier work found that file-based delivery lowers accuracy in many setups without explaining why [^1].
What happened
Researchers at the University of California, Riverside and Irvine studied agents using PHREEQC, a widely used geochemistry simulator from the USGS whose reports reach 846,800 characters and whose determinism lets every printed value be traced [^1]. The agents answered 158 execution-verified multiple-choice questions [^1]. When the report was read through a section index instead of in context, GPT-5.1 lost 11.3 points and GPT-5.2 7.9, while Claude Opus 4.6 and Claude Sonnet 4.6 showed no detectable cost [^1].
Replaying all 11,007 logged simulator calls showed that both GPT models computed the correct value about as often as before. What changed was where they took the answer from: they often skipped the report, answered from their own higher-precision output files and rounded to a neighboring option [^1]. In one example, an agent truncated 2.75065 to the wrong option 2.750 even when told how to round [^1]. With the simulation held fixed, retrieval still cost GPT-5.2 9.4 points; for GPT-5.4, more frequent correct simulations masked a loss of about ten points in evidence use [^1].
Telling the agents which output was authoritative raised accuracy by 6.3 to 7.9 points over plain retrieval for the three GPT models. For GPT-5.1 and GPT-5.2, inlining outputs that fit worked as well, while simply asking for correct rounding did not [^1].
Why it matters
Final accuracy hides where things go wrong. An agent can do the hard part right, run the correct simulation, and still answer wrongly because it trusts the wrong file. The authors' point is that context-management choices in agent harnesses should be judged by where accuracy is lost, not only by the final score [^1].
Practical example
Say an agent runs a simulation that writes a value to an official report, rounded to three decimals, and to its own scratch file with five. Asked a multiple-choice question, it reads only its scratch file and rounds 2.75065 down to a wrong option, 2.750 [^1]. Adding one line to the harness, "answer from the report," fixes cases like this, according to the study [^1].
Related gear
We recommend this book because it explains how retrieval, indexing, and data pipelines affect software reliability across complex systems.