让冻结大模型在推理中调用未见过的工具,无需微调
Chain-of-Tools: Utilizing Massive Unseen Tools in the CoT Reasoning of Frozen Language Models
- 基于思维链推理,利用冻结模型语义能力选择工具
- 在未见工具场景下仍保持高准确率,优于基线方法
- 适用于需要灵活调用外部工具的智能系统开发
工具学习可拓展大语言模型的应用场景。然而现有方法通常需微调模型,使其仅能使用训练中见过的工具,或通过提示添加工具示例,效率较低。本文提出新方法 Chain-of-Tools,充分利用冻结大模型的语义表征能力,在思维链推理中调用大规模、灵活的工具池,包含未见过的工具。为验证该方法在大量未见工具场景下的有效性,我们构建了新数据集 SimpleToolQuestions。在两个数值推理基准(GSM8K-XL、FuncQA)和两个知识问答基准(KAMEL、SimpleToolQuestions)上进行实验,结果表明该方法性能优于基线。同时识别出影响工具选择的关键输出维度,提升模型可解释性。代码与数据已开源:https://github.com/fairyshine/Chain-of-Tools。
原文摘要 · Abstract (English)
Tool learning can further broaden the usage scenarios of large language models (LLMs). However most of the existing methods either need to finetune that the model can only use tools seen in the training data, or add tool demonstrations into the prompt with lower efficiency. In this paper, we present a new Tool Learning method Chain-of-Tools. It makes full use of the powerful semantic representation capability of frozen LLMs to finish tool calling in CoT reasoning with a huge and flexible tool pool which may contain unseen tools. Especially, to validate the effectiveness of our approach in the massive unseen tool scenario, we construct a new dataset SimpleToolQuestions. We conduct experiments on two numerical reasoning benchmarks (GSM8K-XL and FuncQA) and two knowledge-based question answering benchmarks (KAMEL and SimpleToolQuestions). Experimental results show that our approach performs better than the baseline. We also identify dimensions of the model output that are critical in tool selection, enhancing the model interpretability. Our code and data are available at: https://github.com/fairyshine/Chain-of-Tools .
Thank you to arXiv for use of its open access interoperability. PaperDance 不是 arXiv 官方产品;中文卡片由大模型生成,请以原文为准。