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

通过分层大语言模型作为编辑器进行工具调用的验证引导上下文优化

Verification-Guided Context Optimization for Tool Calling via Hierarchical LLMs-as-Editors

Henger Li, Shuangjie You, Flavio Di Palo, Yiyue Qian, Ayush Jain

AI总结:

通过分层LLM作为编辑器,验证引导上下文优化提升工具调用的准确性和泛化能力。

摘要:

工具调用使大语言模型(LLMs)能够通过工具调用与外部环境交互,提供了一种克服预训练限制的实用方法。然而,工具使用的有效性严重依赖于相关文档和知识库上下文的质量。这些材料通常是为人类用户撰写的,往往与LLM如何解释信息不一致。这个问题在工业环境中更加突出,因为数百个功能重叠的工具在可扩展性、变异性及歧义性方面带来了挑战。我们提出了验证引导上下文优化(VGCO),一个利用LLM作为编辑器自动优化工具相关文档和知识库上下文的框架。VGCO分为两个阶段。首先,评估收集现实中的失败案例并识别工具与其上下文之间的不匹配。其次,优化通过离线学习进行分层编辑,利用结构感知的上下文优化。我们LLM编辑器的创新性有三个方面。第一,它们使用分层结构,自然地整合到工具调用流程中。第二,它们是状态感知、动作特定且验证引导的,这限制了搜索空间并使改进更加高效和针对性。第三,它们使子任务专业化更加成本有效,可以通过提示工程大编辑器模型或通过后训练小编辑器模型实现。与以往强调多轮推理的工作不同,VGCO专注于单轮、大规模工具调用问题,并在LLM的准确性、鲁棒性和泛化能力上实现了显著提升。

英文摘要:

Tool calling enables large language models (LLMs) to interact with external environments through tool invocation, providing a practical way to overcome the limitations of pretraining. However, the effectiveness of tool use depends heavily on the quality of the associated documentation and knowledge base context. These materials are usually written for human users and are often misaligned with how LLMs interpret information. This problem is even more pronounced in industrial settings, where hundreds of tools with overlapping functionality create challenges in scalability, variability, and ambiguity. We propose Verification-Guided Context Optimization (VGCO), a framework that uses LLMs as editors to automatically refine tool-related documentation and knowledge base context. VGCO works in two stages. First, Evaluation collects real-world failure cases and identifies mismatches between tools and their context. Second, Optimization performs hierarchical editing through offline learning with structure-aware, in-context optimization. The novelty of our LLM editors has three main aspects. First, they use a hierarchical structure that naturally integrates into the tool-calling workflow. Second, they are state-aware, action-specific, and verification-guided, which constrains the search space and enables efficient, targeted improvements. Third, they enable cost-efficient sub-task specialization, either by prompt engineering large editor models or by post-training smaller editor models. Unlike prior work that emphasizes multi-turn reasoning, VGCO focuses on the single-turn, large-scale tool-calling problem and achieves significant improvements in accuracy, robustness, and generalization across LLMs.

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

↑