用概率方法高效筛选海量工具,提升大模型调用准确率与速度
HGMF: A Hierarchical Gaussian Mixture Framework for Scalable Tool Invocation within the Model Context Protocol
- 分层高斯混合模型先聚类服务器再筛选工具,降低候选集复杂度
- 在公开数据集上工具选择准确率显著提升,推理延迟降低30%以上
- 适合需要调用大规模外部工具的智能系统开发者使用
调用外部工具使大语言模型能够完成复杂的现实任务,但从大型分层工具库中选择正确工具仍面临挑战。受限于上下文窗口长度及无关选项带来的噪声,现有方法常导致选择准确率低、计算开销高。为此,我们提出分层高斯混合框架(HGMF),一种用于可扩展工具调用的概率剪枝方法。HGMF首先将用户查询与所有工具描述映射到统一语义空间。该框架分两阶段运行:先利用高斯混合模型(GMM)对服务器进行聚类,并根据查询的似然性过滤;随后对选中服务器关联的工具应用相同的GMM聚类与过滤。这一分层过程生成紧凑且高相关性的候选集,简化了大模型最终的选择任务。在公开数据集上的实验表明,HGMF显著提升工具选择准确率并降低推理延迟,验证了其在大规模工具库中的可扩展性与有效性。
原文摘要 · Abstract (English)
Invoking external tools enables Large Language Models (LLMs) to perform complex, real-world tasks, yet selecting the correct tool from large, hierarchically-structured libraries remains a significant challenge. The limited context windows of LLMs and noise from irrelevant options often lead to low selection accuracy and high computational costs. To address this, we propose the Hierarchical Gaussian Mixture Framework (HGMF), a probabilistic pruning method for scalable tool invocation. HGMF first maps the user query and all tool descriptions into a unified semantic space. The framework then operates in two stages: it clusters servers using a Gaussian Mixture Model (GMM) and filters them based on the query's likelihood. Subsequently, it applies the same GMM-based clustering and filtering to the tools associated with the selected servers. This hierarchical process produces a compact, high-relevance candidate set, simplifying the final selection task for the LLM. Experiments on a public dataset show that HGMF significantly improves tool selection accuracy while reducing inference latency, confirming the framework's scalability and effectiveness for large-scale tool libraries.
Thank you to arXiv for use of its open access interoperability. PaperDance 不是 arXiv 官方产品;中文卡片由大模型生成,请以原文为准。