Tool-augmented large language models (LLMs) have achieved remarkable progress in tackling a broad range of tasks. However, existing methods are mainly restricted to specifically designed tools and fail to fulfill complex instructions, having great limitations when confronted with real-world scenarios. In this paper, we explore a more realistic scenario by connecting LLMs with RESTful APIs, which adhere to the widely adopted REST software architectural style for web service development. To address the practical challenges of tackling complex instructions, we propose RestGPT, which exploits the power of LLMs and conducts a coarse-to-fine online planning mechanism to enhance the abilities of task decomposition and API selection. RestGPT also contains an API executor tailored for calling RESTful APIs, which can meticulously formulate parameters and parse API responses. To fully evaluate the performance of RestGPT, we propose RestBench, a high-quality benchmark which consists of two real-world scenarios and human-annotated instructions with gold solution paths. Experiments show that RestGPT is able to achieve impressive results in complex tasks and has strong robustness, which paves a new way towards AGI. RestGPT and RestBench is publicly available at https://restgpt.github.io/.
翻译:工具增强的大语言模型在广泛任务中取得了显著进展。然而,现有方法主要局限于特定设计的工具,难以处理复杂指令,在应对真实场景时存在重大局限。本文通过将大语言模型与遵循广泛采用的REST软件架构风格的Web服务API相连接,探索更为现实的场景。为应对处理复杂指令的实际挑战,我们提出RestGPT,该模型利用大语言模型的能力,采用从粗到细的在线规划机制,增强任务分解与API选择的能力。RestGPT还包含专为调用RESTful API设计的API执行器,可精细制定参数并解析API响应。为全面评估RestGPT性能,我们提出RestBench——一个包含两个真实场景及人工标注指令与黄金解题路径的高质量基准。实验表明,RestGPT能出色完成复杂任务,并具有强鲁棒性,为通向AGI开辟了新路径。RestGPT与RestBench已开源至https://restgpt.github.io/。