Mathematical agents need mandatory checks to catch fake tool answers

When Tools Lie: Reliability of Mathematical Agents Under Corrupted Tool Feedback

Cryptography and SecurityArtificial IntelligenceSoftware Engineering

Summary

Mathematical problem-solving often relies on computer tools, but these tools can sometimes give wrong answers that look believable. The authors studied how well agents detect and fix these false answers by intentionally changing tool results in tests. They found that without double-checking, accuracy drops significantly, but requiring agents to always reflect on the tool’s answer brings accuracy back to perfect. Optional checks helped only if the agent chose to do them. This shows that making verification mandatory is important for reliable math problem-solving with tools.

What this means in practice

  • For software developers: Design software agents that always verify tool outputs to prevent silent errors in mathematical computations.
  • For automated reasoning engineers: Implement mandatory verification steps in reasoning tools to ensure correctness despite possible corrupted intermediate results.

Authors

Kavienan Jegatheesan, Gayathri Lihinikaduarachchi

Abstract

Mathematical problem solving often requires deterministic computational steps that agents delegate to tools and implicitly trust. Yet tools can fail silently, returning plausible but incorrect results. How well can agents detect and correct corrupted tool call outputs? We study this through a controlled corruption framework where a hidden interceptor replaces tool call results with plausible incorrect information on targeted problems. We evaluate agents across 31 problems under four verification designs including no verification (baseline), mandatory same-context reflection, optional fresh-context verification, and optional structural verification. Without verification, corruption causes dramatic accuracy loss, from 100% down to 72.4%. Mandatory reflection fully recovers this performance to 100%. Optional verification improves accuracy only when models actively invoke it. Our results show that checking frequency is strongly associated with robustness differences, while unequal invocation prevents a controlled comparison of verifier quality. A supporting recovery experiment shows that full problem restart succeeds in 100% of cases after explicit detection. These findings demonstrate that verifier availability and verification policy are separate components of mathematical-agent reliability. Mandatory policies enforce verification while optional policies depend on the model's own choice to invoke it.