arXiv:2606.12451cs.AIcs.IR2026-06被引 2

提出工具诊断框架ToolSense,发现大模型工具理解与检索能力常脱节。

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

论文配图:ToolSense: A Diagnostic Framework for Auditing Parametric Tool Knowledge in LLMs
图 1 · 摘自论文原文
  • 用虚拟词元编码工具,让大模型自建检索系统。
  • 真实模糊查询下,部分模型性能下降50%-64个百分点。
  • 适合评估大模型工具知识的可信度与真实性。

部署于大型工具目录的大语言模型面临关键的工具检索瓶颈。基于嵌入的检索方法依赖紧凑编码器,可能无法充分捕捉专业工具语义;参数化工具检索通过将每个工具编码为附加到LLM词汇表的虚拟词元,在两阶段(记忆+检索SFT)微调后,使模型具备检索能力,在标准ToolBench基准上表现优异。然而这些基准使用冗长且完整的查询,评估时采用受限解码,仅允许有效词路径输出,无法揭示模型是否真正理解工具。本文提出开源的ToolSense诊断框架,输入任意工具目录后自动生成三个基准:真实检索基准(RRB,含三级模糊性查询)、多项选择题探测基准、问答探测基准。在ToolBench(约47,000个工具)上应用ToolSense,评估五种参数化模型训练配置,发现知识-检索解耦现象:在RRB查询中,多个配置性能下降50%-64个百分点,低于嵌入模型基线;尽管检索表现良好,部分模型在事实性探测中得分接近随机,表明其工具知识不真实。我们已开源ToolSense框架及ToolBench诊断基准至https://github.com/SAP/toolsense。

原文摘要 · Abstract (English)

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. 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.

大模型工具检索诊断框架知识验证

Thank you to arXiv for use of its open access interoperability. PaperDance 不是 arXiv 官方产品;中文卡片由大模型生成,请以原文为准。