Manuscript Offprint

arXiv:2608.27750

The Calls are Coming from Inside the Model: Investigating Probe-based Detection of Tool-Calling Errors in LLMs

Eric Yeats, Brendan Kennedy, Loc Truong, John Buckheit, Jung Lee, Jesse Friedbaum, John Emanuello, Henry Kvinge

Open access. PaperVantage converted this article to text, so layout and figures may differ from the original.

Abstract

The hidden states of large language models (LLMs) are known to capture rich information relating to model knowledge and behavior that can be hard to extract from examination of input and output alone. As LLM-based systems increasingly interface with the external world, one area of concern is detecting incorrect or improper use of tools. Motivated by this, we study the effectiveness of using linear probes to detect incorrect tool-calls, measuring probe efficacy across 18 tool-calling LLMs evaluated on the Berkeley Function Calling Leaderboard. Overall, we find that probing is an effective means to catch a range of different tool-calling errors, including errors arising from using an argument that has the wrong value but the correct type, which might not be recorded by standard logging frameworks. Important factors in success include model size, probing layer, and model post-training type. We also show that probes are capable of generalizing to novel types of errors, which is critical in real world deployments.

1 Introduction

Large language models (LLMs) have demonstrated remarkable capabilities across a wide range of tasks, including the ability to interface with external tools and APIs through structured function calls [Achiam et al., 2023, Touvron et al., 2023]. This tool-calling capability is increasingly central to agentic AI systems, where LLMs must select appropriate tools, supply correct arguments, and chain multiple calls to accomplish complex goals [Schick et al., 2023, Qin et al., 2024]. As these systems are deployed in production settings, the reliability of tool-calls becomes critical.

LLM hallucinations, or outputs that are fluent but factually incorrect or unfaithful to context, remain pervasive and have received substantial attention in the broader NLP community [Huang et al., 2025, Bang et al., 2023]. A prominent line of work has shown that the internal representations, or hidden states, of LLMs contain rich signals that are predictive of model errors and hallucinations [Burns et al., 2022, Kadavath et al., 2022, Yeats et al., 2026]. These findings, along with the linear representation hypothesis Park et al. [2023], have motivated the development of lightweight probes Azaria and Mitchell [2023], Orgad et al. [2025], linear classifiers or small MLPs trained on hidden states. Probes act as inexpensive monitors that can flag potential errors at inference time without requiring multiple evaluations of the LLM or access to external verifiers [Varshney et al., 2023, Chen et al., 2024].

Despite this progress, hallucination detection via probing has been studied primarily in the context of factual question answering and text summarization. Tool-calling presents a distinct challenge:

∗^{*}Corresponding Author

Preprint.

errors are structural and semantic rather than purely factual, and they span a diverse taxonomy [Patil et al., 2024, 2025]. The field of tool-calling error detection with hidden states remains underexplored. The most closely related work to ours is Healy et al. [2026], who investigate probes trained on the last layer of LLM hidden states for tool selection hallucination detection. They compare probes with consistency baselines, showing that probes are a lightweight and effective method for tool-call error prediction. However, their study is limited to just three models, does not investigate how probe effectiveness varies across different model sizes, architectures, and training regimes, and does not validate whether probing is detecting narrow failure patterns or is actually capturing more general notions of tool-calling incorrectness.

Our exploratory work extends this line of research in two key directions. First, we conduct a large-scale study of probe effectiveness across 18 tool-calling LLMs evaluated on the Berkeley Function Calling Leaderboard (BFCL) [Patil et al., 2025], spanning model sizes from 1B to 70B parameters and a variety of post-training regimes. We identify consistent trends: model size is the strongest predictor of probe effectiveness, followed by recording layer depth and whether the model has been specifically fine-tuned for tool use. Second, we investigate the generalization of probes to novel error types by training probes on one subset of the error taxonomy and evaluating on a held-out subset. We find that probes trained on one tool-calling error type largely transfer to detecting others, and that this transfer improves with model scale, aligning with evidence that larger models develop more general and abstract internal representations of what it means to perform an ‘incorrect’ tool-call.

References (28)