arXivDaily arXiv每日学术速递 周一至周五更新
arXiv 2601.05214cs.AI

内部表示作为代理工具选择中的幻觉指示器

Internal Representations as Indicators of Hallucinations in Agent Tool Selection

Kait Healy, Bharathi Srinivasan, Visakh Madathil, Jing Wu

AI总结:

本文提出了一种利用LLM内部表示实时检测工具调用幻觉的方法,通过减少计算开销实现高准确率的检测,尤其在参数和工具选择方面表现优异。

摘要:

大型语言模型(LLMs)在工具调用和工具使用方面展现出了显著的能力,但存在幻觉问题,即它们选择错误的工具,提供格式错误的参数,并通过模拟和生成输出而不是调用专用工具或外部系统来执行'工具绕过'行为。这削弱了基于LLM的代理在生产系统中的可靠性,因为它导致不一致的结果,并绕过了安全性和审计控制。此类代理工具选择中的幻觉需要早期检测和错误处理。与现有需要多次前向传递或外部验证的幻觉检测方法不同,我们提出了一种计算效率高的框架,通过在生成所用的同一前向传递中利用LLM的内部表示,实现实时检测工具调用幻觉。我们在多个领域的原因任务上评估了这种方法,展示了强大的检测性能(最高86.4%的准确率),同时保持实时推理能力,计算开销极小,特别是在检测参数层面的幻觉和不恰当的工具选择方面表现突出,这对可靠的代理部署至关重要。

英文摘要:

Large Language Models (LLMs) have shown remarkable capabilities in tool calling and tool usage, but suffer from hallucinations where they choose incorrect tools, provide malformed parameters and exhibit 'tool bypass' behavior by performing simulations and generating outputs instead of invoking specialized tools or external systems. This undermines the reliability of LLM based agents in production systems as it leads to inconsistent results, and bypasses security and audit controls. Such hallucinations in agent tool selection require early detection and error handling. Unlike existing hallucination detection methods that require multiple forward passes or external validation, we present a computationally efficient framework that detects tool-calling hallucinations in real-time by leveraging LLMs' internal representations during the same forward pass used for generation. We evaluate this approach on reasoning tasks across multiple domains, demonstrating strong detection performance (up to 86.4\% accuracy) while maintaining real-time inference capabilities with minimal computational overhead, particularly excelling at detecting parameter-level hallucinations and inappropriate tool selections, critical for reliable agent deployment.

机构、总结、中文摘要均由AI分析而来,可能存在错误,请以论文正文为准。

↑