The Calls are Coming from Inside the Model: Investigating Probe-based Detection of Tool-Calling Errors in LLMs
Organizations: Pacific Northwest National Laboratory · National Security Agency
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.
Figures & tables
Appendix figures & tables10 assets
Supplementary material from the paper’s appendix.
Appendix
| Model | Size | Python Tools | Java Tools | JavaScript Tools | Python Tools |
| (B) | (Single) | (Single) | (Single) | (Multi) | |
| gemma-3-1b-it | 1 | 24.00 | 5 | 4 | 0.00 |
| Phi-4-mini-instruct | 3.8 | 84.75 | 54 | 62 | 88.50 |
| Falcon3-7B-Instruct | 7 | 93.25 | 58 | 42 | 89.00 |
| Llama-3.1-8B-Instruct | 8 | 50.50 | 57 | 60 | 54.50 |
| granite-3.1-8b | 8 | 90.50 | 57 | 56 | 91.50 |
| Model | Size | Correct | Incor. | Missing | Unnec. | H. Tool/ | Type | Syntax |
|---|---|---|---|---|---|---|---|---|
| (B) | Value | Param. | Tool | Param. | Error | Error | ||
| gemma-3-1b-it | 1 | 13.73 | 3.74 | 22.00 | 0.26 | 6.27 | 1.86 | 52.14 |
| Phi-4-mini-instruct | 3.8 | 80.13 | 5.07 | 0.40 | 0.40 | 0.53 | 3.33 | 10.13 |
| Falcon3-7B-Instruct | 7 | 84.00 | 9.46 | 0.80 | 0.94 | 0.27 | 4.14 | 0.40 |
| Llama-3.1-8B-Instruct | 8 | 53.07 | 7.20 | 0.00 | 0.27 | 0.80 | 37.07 | 1.60 |
| granite-3.1-8b | 8 | 84.00 | 6.13 | 0.66 | 0.67 | 0.40 | 5.20 | 2.93 |
| Model | Post-Training |
|---|---|
| Falcon3-7B-Instruct | Instruction Tuned |
| granite-3.1-8b | Instruction Tuned |
| granite-3.2-8b | Instruction Tuned |
| Ministral-8B-2410 | Instruction Tuned |
| Qwen3-8B | Instruction Tuned |
| Hermes-2-Pro-Llama-3 | Tool Finetuned |
| Partition | Split | Error Categories |
|---|---|---|
| A/B | A | Incorrect Value, Missing Parameter, Syntax Error |
| B | Unnecessary Tool-Call, Hallucinated Tool/Param., Type Error | |
| C/D | C | Missing Parameter, Type Error, Syntax Error |
| D | Incorrect Value, Unnecessary Tool-Call, Hallucinated Tool/Param. |
Language Model Error Detection
Language model error detection identifies unreliable answers, reasoning steps, and actions so systems can flag, verify, or repair them.
See all 91 papers