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

NTILC: 通过学习的压缩实现神经工具调用

NTILC: Neural Tool Invocation via Learned Compression

Department of Robotics, University of Michigan(机器人学系,密歇根大学);Department of ECE, University of Michigan(电子工程与计算机科学系,密歇根大学)

Andrew Krikorian, Yayuan Li, Jason J. Corso

AI总结:

提出NTILC框架,用学习的潜在检索替代上下文工具查找,将工具选择与参数生成解耦,通过签名感知复合损失函数提升选择精度,相比基线减少95%上下文消耗和74%延迟。

摘要:

基于代理的工具调用语言模型依赖于大量可调用API、函数和本地动作的注册表。直接将完整工具规范放入提示中的成本随工具注册表大小线性增长,迅速消耗上下文预算。随着注册表增长,这导致更高的延迟和降低的选择准确性,特别是由于不相关工具的干扰。我们通过引入NTILC(一种神经工具选择和调用框架)克服了这些限制,该框架用学习的潜在检索取代了上下文注册表查找。NTILC将用户意图和工具规范映射到共享嵌入空间,通过外部检索而非上下文查找实现工具选择。语言模型仅基于所选工具模式进行条件生成,从而实现精确、受限的参数生成。我们方法的核心是签名感知复合目标,它通过从工具签名(例如参数模式、类型兼容性和返回类型)派生的约束来增强语义相似性。通过将Circle Loss与Functional Margin Loss相结合,模型强制区分语义相似但在执行签名下不兼容的工具。我们在公开的工具选择和函数调用数据集上评估NTILC,并报告上下文令牌使用量、检索准确性和选择延迟指标。在这些设置中,与长上下文ICT基线相比,NTILC将上下文窗口消耗减少了95%以上,推理延迟减少了高达74%。

英文摘要:

Agentic tool-calling language models depend on large registries of callable APIs, functions, and local actions. Placing full tool specifications directly in the prompt incurs a cost that scales linearly with the size of the tool registry, rapidly consuming the context budget. As the registry grows, this leads to higher latency and degrades selection accuracy, particularly due to interference from irrelevant tools. We overcome these limitations by introducing NTILC, a neural tool selection and invocation framework that replaces in-context registry look-up with learned latent retrieval. NTILC maps both user intent and tool specifications into a shared embedding space, enabling tool selection via external retrieval rather than in-context lookup. The language model is conditioned only on the selected tool schema, allowing for precise, constrained argument generation. Central to our approach is a signature-aware composite objective, which augments semantic similarity with constraints derived from tool signatures (e.g., argument schema, type compatibility, and return types). By combining Circle Loss with a Functional Margin Loss, the model enforces separation between tools that are semantically similar but incompatible under their execution signatures. We evaluate NTILC on public tool-selection and function-calling datasets and report context token usage, retrieval accuracy, and selection latency metrics. Across these settings, NTILC reduces context window consumption by over 95% and inference latency by up to 74% compared to long-context ICT baselines.

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

↑