Tool Learning in the Wild: Empowering Language Models as Automatic Tool Agents
Zhengliang Shi Shandong UniversityQingdaoChina , Shen Gao University of Electronic Science and Technology of ChinaChengduChina , Lingyong Yan Baidu Inc.BeijingChina , Yue Feng University of BirminghamBirminghamUnited kingdom , Xiuyi Chen Baidu Inc.BeijingChina , Zhumin Chen Shandong UniversityQingdapChina , Dawei Yin Baidu Inc.BeijingChina , Suzan Verberne Leiden UniversityLeidenNetherland and Zhaochun Ren Leiden UniversityLeidenNetherland
Abstract
Augmenting large language models (LLMs) with external tools has emerged as a promising approach to extend their utility, enabling them to solve practical tasks. Previous methods manually parse tool documentation and create in-context demonstrations, transforming tools into structured formats for LLMs to use in their step-by-step reasoning. However, this manual process requires domain expertise and struggles to scale to large toolsets. Additionally, these methods rely heavily on ad-hoc inference techniques or special tokens to integrate free-form LLM generation with tool-calling actions, limiting the LLM’s flexibility in handling diverse tool specifications and integrating multiple tools.
中文速览
让大型语言模型(LLM)自动学会使用外部工具,一直是提升其实用价值的重要方向,但过去的方法都要靠人工解读工具文档、手写示例,费时费力且难以扩展到大规模工具库。AutoTools 框架让 LLM 自己完成这一流程:先自动将原始工具文档转化为可调用的 Python 函数并验证其正确性,再通过编写可执行程序灵活地将多个函数组合起来解决实际任务,整个过程几乎不需要人工干预。在现有基准和新构建的更具挑战性的 AutoTools-Eval 评测集上,该框架显著优于以往方法,而配套提出的 AutoTools-Learning——用 3.4 万条合成数据对小参数量开源模型进行三项任务的微调——进一步弥补了小模型的能力短板。这项工作为 LLM 真正自主地驾驭多样化外部工具、应对现实世界复杂任务迈出了关键一步。
原文 arXiv:2405.16533;中英对照 + 大白话阅读 https://aha.fim.ai/paper/2405.16533v2