ToolSense: A Diagnostic Framework for Auditing Parametric Tool Knowledge in LLMs

Ashutosh Hathidara, Sai Shruthi Sistla, Sebastian Schreiber, Sahil Bansal
6/4/2026
2 citations
cs.AIcs.IRcs.LG

Official code: SAP/toolsense (1 star, Python, Apache-2.0, last commit 2026-06-12).

Abstract

Large language models deployed as agents over large tool catalogs face a critical tool-retrieval bottleneck. As embedding-based retrieval approaches rely on compact encoders that may under-capture specialized tool semantics, parametric tool retrieval addresses this by encoding each tool as a virtual token appended to the LLM vocabulary, fine-tuned in two stages (memorization then retrieval SFT) to use the LLM as a retriever, achieving strong performance on standard ToolBench retrieval benchmarks.

Show full abstract

Yet these benchmarks use verbose, fully-specified queries, and their evaluation applies constrained decoding that restricts outputs to valid token paths, neither reveals whether the model actually understands its tools. We introduce \textbf{ToolSense}, an open-source LLM-powered diagnostic framework that takes any tool catalog as input and automatically generates three benchmarks: a Realistic Retrieval Benchmark (RRB) with queries at three ambiguity tiers, an MCQ probing benchmark, and a QA probing benchmark. Applying ToolSense to ToolBench (~47k tools) and evaluating five parametric model training configurations reveals a knowledge-retrieval dissociation: on RRB queries, several configurations collapse by ~50-64 percentage points compared to fully-specified ToolBench benchmarks, falling below the embedding-model baseline. Additionally, despite strong retrieval performance, some models score near-random on factual probes, suggesting a knowledge-retrieval dissociation. We open-source the ToolSense framework and the ToolBench diagnostic benchmarks at https://github.com/SAP/toolsense.

View on arXivView PDF

Code Implementations(1)

SAP/toolsenseOfficial100%
Apache-2.0

[EMNLP 2026] Opensource Diagnostic Framework for Auditing Parametric Tool Knowledge in LLMs

13Python, JinjaMay 28, 20265 months agoApache-2.0

Similar Papers

Cite this paper

@article{hathidara2026toolsense,
  title  = {ToolSense: A Diagnostic Framework for Auditing Parametric Tool Knowledge in LLMs},
  author = {Ashutosh Hathidara and Sai Shruthi Sistla and Sebastian Schreiber and Sahil Bansal},
  year   = {2026},
  eprint = {2606.12451},
  archivePrefix = {arXiv},
  url    = {http://arxiv.org/abs/2606.12451v2}
}

Add a badge to your README

Shows whether official code is linked for this paper.

Code of Paper badge
[![Code of Paper](https://codeofpaper.com/badge/2606.12451.svg)](https://codeofpaper.com/paper/2606.12451)

Discussion