ToolHaystack: Stress-Testing Tool-Augmented Language Models in Realistic Long-Term Interactions

Beong-woo Kwak, Minju Kim, Dongha Lim, Hyungjoo Chae, Dongjin Kang, Sunghwan Kim, Dongil Yang, Jinyoung Yeo

Abstract

Most current benchmarks for Tool-Augmented Language Models (TALMs) evaluate performance in "vacuum" conditions—short, single-session interactions where all necessary information is provided upfront. We introduce ToolHaystack, a new benchmark designed to stress-test LLM agents in long-term, noisy, and evolving conversations. Our study reveals a massive performance gap: while top-tier models excel at short-term tool use, their accuracy plummets when goals shift or critical information is buried under dozens of irrelevant "haystack" turns. Even frontier models like GPT-4o fail to reach 50% accuracy on ToolHaystack, highlighting a critical need for more robust agentic evaluations.

Introduction: The Challenge of Long-Term Interactions

Real-world AI agents, such as personal assistants, must operate over days or weeks, handling "messy" context that existing benchmarks ignore. The authors identify three specific challenges that define these long-term interactions:

  1. Fragmented Context: Relevant details are scattered across a long history.
  2. Evolving Goals: Users change their minds or update constraints mid-stream.
  3. Semantic Noise: Irrelevant but plausible-sounding information can distract the model from its current objective.

ToolHaystack addresses this by simulating these realistic interactions to see if models can maintain robustness over an average of 32 turns per instance.

Methods: Scenarios of Long-Term Interaction

The ToolHaystack framework is inspired by the "Needle-In-A-Haystack" (NIAH) test. In this context, "needles" are the specific pieces of information required to execute a tool, while the "haystack" consists of irrelevant distractor sessions. The benchmark categorizes long-term challenges into three primary scenarios:

  • Context Recall (CR): Can the model find a specific detail mentioned much earlier?
  • Information Shift (IS): Can the model detect when a user updates a previous instruction (e.g., changing a destination from New York to Seattle)?
  • Missing Context (MC): Can the model recognize when it lacks sufficient information and ask for clarification instead of hallucinating arguments?
The ToolHaystack framework evaluates models on Context Recall (CR), Information Shift (IS), and Missing Context (MC).

To build the dataset, the authors used a multi-stage pipeline: sampling 13,000 real-world APIs from RapidAPI, constructing structured tool sequences with shared arguments, and using frontier LLMs to instantiate these into naturalistic dialogues.

The ToolHaystack Benchmark

ToolHaystack differs significantly from existing datasets like ToolBench or the Berkeley Function Calling Leaderboard (BFCL) in its complexity and length. While most benchmarks average 1 to 5 turns, ToolHaystack pushes models to 32 turns, incorporating distractor tasks and granular complexity that others lack.

Comparison of ToolHaystack against other TALM benchmarks across key dimensions, showing the significant increase in interaction length and complexity.

Key Insights and Results

The evaluation of 14 state-of-the-art LLMs yielded several surprising findings:

  • The "Finetuning Trap": Models specifically fine-tuned for tool use (like ToolACE) often perform worse on ToolHaystack than general-purpose frontier models. While they follow tool syntax well in short bursts, they struggle to generalize to noisy, long-context environments.
  • Recency Bias: Models exhibit a strong bias toward recent information. Performance drops sharply as the "distance" to the required evidence increases.
  • Hallucination in the Dark: In "Missing Context" scenarios, models frequently hallucinate arguments (using default values or random strings) rather than admitting they don't know the information.
  • Benchmark Saturation: While many models are hitting near-perfect scores on benchmarks like BFCL, those same models fail to reach even 50% accuracy on ToolHaystack. GPT-4.5-Preview achieved the highest average score, but only reached 42.11% accuracy.

Conclusion and Future Work

ToolHaystack highlights that current TALMs are not yet ready for the complexities of long-term deployment. Future research should focus on improving extremely long-term memory (hundreds or thousands of turns) and investigating how reasoning-intensive models (like the OpenAI o1 series) might impact long-term tool robustness. Expanding API diversity and complex, inter-dependent API chains remains a priority for future iterations of the benchmark.

Summary updated

BibTeX
@misc{kwak2025toolhaystack,
  author = {Beong-woo Kwak and Minju Kim and Dongha Lim and Hyungjoo Chae and Dongjin Kang and Sunghwan Kim and Dongil Yang and Jinyoung Yeo},
  title = {{ToolHaystack: Stress-Testing Tool-Augmented Language Models in Realistic Long-Term Interactions}},
  year = {2025},
  eprint = {2505.23662},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/2505.23662},
}
Figure