Large Language Models (LLMs) have demonstrated remarkable progress in utilizing tools, but their closed-source nature and high inference costs pose limitations on their adaptability, necessitating a valid method that leverages smaller, open-sourced models. In this paper, we introduce Toolink, a comprehensive framework that performs task-solving by first creating a toolkit and then integrating the planning and calling of tools through a chain-of-solving (CoS) approach. We first validate the efficacy of Toolink in harnessing the model's creativity and CoS ability on ChatGPT. Subsequently, we curate CoS-GPT, a chain-of-solving dataset designed for tool-using, and finetune the LLaMA-7B model. It results in LLaMA-CoS, a powerful open-source model with advanced tool-planning and tool-calling capabilities. Evaluation of diverse tasks from BIG-bench demonstrates its CoS ability matches that of ChatGPT while its performance surpasses the chain-of-thought approach. Further studies highlight the generalization of LLaMA-CoS to unseen tasks and showcase its capability in using toolkits not explicitly tailored for the target task, affirming its robustness in real-world scenarios.
翻译:大型语言模型(LLMs)在工具使用方面展现出显著进展,但其闭源性质和高推理成本限制了适应性,亟需一种利用更小规模开源模型的有效方法。本文提出Toolink,一个综合框架,通过首先生成工具包,再借助解题链(CoS)方法整合工具规划与调用,完成目标任务。我们首先验证了Toolink在ChatGPT上激发模型创造力与CoS能力的有效性,随后构建了专用于工具使用的解题链数据集CoS-GPT,并微调LLaMA-7B模型,最终获得具备先进工具规划与调用能力的开源模型LLaMA-CoS。在BIG-bench多样化任务上的评估表明,其CoS能力可媲美ChatGPT,且性能超越思维链方法。进一步研究凸显LLaMA-CoS对未见任务的泛化能力,以及使用非目标定制工具包的有效性,证明了其在真实场景中的鲁棒性。