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

ToolLibGen:面向LLM推理的可扩展自动工具创建与聚合

ToolLibGen: Scalable Automatic Tool Creation and Aggregation for LLM Reasoning

George Mason University(乔治·玛森大学);Salesforce AI Research(Salesforce人工智能研究)

Murong Yue, Zhiwei Liu, Liangwei Yang, Jianguo Zhang, Zuxin Liu, Haolin Chen, Ziyu Yao, Silvio Savarese, Caiming Xiong, Shelby Heinecke, Huan Wang

AI总结:

针对LLM工具增强推理中工具检索的可扩展性瓶颈,提出ToolLibGen系统,通过聚类和多智能体重构将非结构化工具自动聚合为结构化工具库,提升检索准确率与推理性能。

摘要:

配备外部工具的大型语言模型(LLMs)在复杂推理任务上展现出更优的性能。然而,这种工具增强推理的广泛采用受到领域特定工具稀缺的阻碍。例如,在物理问答等领域,往往缺乏合适且专门的工具。近期研究探索了通过从思维链(CoT)推理轨迹中提取可复用函数来自动创建工具;然而,这些方法面临关键的可扩展性瓶颈。随着生成工具数量的增长,将它们存储在非结构化集合中会导致显著的检索挑战,包括搜索空间不断扩大以及功能相关工具之间的歧义。为解决此问题,我们提出了一种系统化方法,将非结构化工具集合自动重构为结构化工具库。我们的系统首先生成离散的、任务特定的工具,并将其聚类为语义连贯的主题。在每个聚类中,我们引入一个多智能体框架来整合分散的功能:一个代码智能体重构代码以提取共享逻辑并创建通用的聚合工具,同时一个审查智能体确保这些聚合工具保持原始工具集的完整功能。该过程将大量问题特定工具转化为少量功能强大的聚合工具,且不损失功能。实验结果表明,我们的方法在多个推理任务上显著提高了工具检索准确率和整体推理性能。此外,与基线相比,随着问题特定工具数量的增加,我们的方法展现出更强的可扩展性。

英文摘要:

Large Language Models (LLMs) equipped with external tools have demonstrated enhanced performance on complex reasoning tasks. The widespread adoption of this tool-augmented reasoning is hindered by the scarcity of domain-specific tools. For instance, in domains such as physics question answering, suitable and specialized tools are often missing. Recent work has explored automating tool creation by extracting reusable functions from Chain-of-Thought (CoT) reasoning traces; however, these approaches face a critical scalability bottleneck. As the number of generated tools grows, storing them in an unstructured collection leads to significant retrieval challenges, including an expanding search space and ambiguity between function-related tools. To address this, we propose a systematic approach to automatically refactor an unstructured collection of tools into a structured tool library. Our system first generates discrete, task-specific tools and clusters them into semantically coherent topics. Within each cluster, we introduce a multi-agent framework to consolidate scattered functionalities: a code agent refactors code to extract shared logic and creates versatile, aggregated tools, while a reviewing agent ensures that these aggregated tools maintain the complete functional capabilities of the original set. This process transforms numerous question-specific tools into a smaller set of powerful, aggregated tools without loss of functionality. Experimental results demonstrate that our approach significantly improves tool retrieval accuracy and overall reasoning performance across multiple reasoning tasks. Furthermore, our method shows enhanced scalability compared with baselines as the number of question-specific increases.

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

↑