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

调用还是不调用:评估和优化LLM工具调用的框架

To Call or Not to Call: A Framework to Assess and Optimize LLM Tool Calling

Max Planck Institute for Software Systems(马克斯·普朗克软件系统研究所);Ruhr University Bochum(博德姆鲁尔大学);UAR RC Trust(UAR RC信托)

Qinyuan Wu, Soumi Das, Mahsa Amani, Arijit Nag, Seungeon Lee, Krishna P. Gummadi, Abhilasha Ravichander, Muhammad Bilal Zafar

AI总结:

提出一个基于决策理论的框架,从必要性、效用和可负担性三个关键因素评估LLM的网页搜索工具调用决策,并训练轻量级估计器优化调用,提升任务性能。

摘要:

智能体AI架构通过外部工具增强LLM,解锁了强大的能力。然而,工具使用并不总是有益的;某些调用可能是冗余甚至有害的。因此,有效的工具使用取决于LLM的核心决策:在执行任务时是否调用工具。这一决策对于网页搜索工具尤其具有挑战性,因为外部信息的收益取决于模型的内部知识及其整合潜在噪声工具响应的能力。我们引入了一个受决策理论启发的原则性框架,用于评估网页搜索工具使用决策的三个关键因素:必要性、效用和可负担性。我们的分析结合了两种互补视角:规范性视角,从工具调用的最优分配推断真实需求和效用;描述性视角,从模型观察到的行为推断其自我感知的需求和效用。我们在四种网页搜索工具和三种任务上,评估了六种开源和一种闭源前沿模型,采用两种测试环境:一种仅基于当前轮次及其搜索结果,另一种基于完整执行轨迹。在每个设置中,我们发现模型的感知需求和效用经常与真实需求和效用不一致。基于此框架,我们从模型的隐藏状态训练轻量级需求和效用估计器。这些估计器驱动简单的控制器,提高了决策质量,并为大多数开源模型带来了比自我感知基线更强的任务性能。

英文摘要:

Agentic AI architectures augment LLMs with external tools, unlocking strong capabilities but potentially incurring substantial costs. Moreover, tool use is not always beneficial: redundant or low-utility calls can even harm task performance. Effective tool use, therefore, hinges on a core LLM decision: whether to call or not call a tool when performing a task. We introduce a principled framework inspired by decision-making theory to understand tool-use decisions along three key factors: necessity, utility, and affordability. Our analysis combines two complementary lenses: a normative perspective that infers true need and utility for optimal tool calls, and a descriptive perspective that infers the model's self-perceived need and utility from their observed behaviors. We evaluate six open models and a proprietary OpenAI model across native and customized harnesses, two tools, and six tasks. Models' perceived need and utility remain misaligned with their true values, particularly under budget constraints. This misalignment produces both costly overuse and performance-degrading calls. To improve the tool decisions, we train lightweight latent estimators of need (LNEs) from model hidden states. LNEs generally predict true need more accurately than model self-reports and improve budgeted tool allocation across model scales and tool types. Code and dataset available at https://github.com/QinyuanWu0710/ToCall_or_NotToCall.

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

↑