Gorilla:连接海量API的大型语言模型
Gorilla: Large Language Model Connected with Massive APIs
AI总结:
Gorilla是一个基于LLaMA微调的模型,通过结合文档检索器,在API调用生成上超越GPT-4,并能适应文档更新、减少幻觉,提升LLM使用工具的准确性与可靠性。
摘要:
大型语言模型(LLMs)近期取得了令人瞩目的进展,如今这些模型在数学推理和程序合成等多种任务中表现出色。然而,它们通过API调用有效使用工具的潜力仍未得到充分发挥。即使对于GPT-4等当今最先进的LLMs而言,这仍是一项具有挑战性的任务,主要原因在于它们无法生成准确的输入参数,并且倾向于对API调用的错误用法产生幻觉。我们发布了Gorilla,这是一个基于LLaMA微调的模型,在编写API调用方面超越了GPT-4的性能。当与文档检索器结合使用时,Gorilla展现出强大的适应测试时文档变化的能力,从而支持灵活的用户更新或版本变更。它还大幅缓解了直接提示LLMs时常见的幻觉问题。为了评估模型的能力,我们引入了APIBench,这是一个由HuggingFace、TorchHub和TensorHub API组成的综合数据集。检索系统与Gorilla的成功集成表明,LLMs有潜力更准确地使用工具、跟上频繁更新的文档,从而提升其输出的可靠性和适用性。Gorilla的代码、模型、数据和演示可在https://gorilla.cs.berkeley.edu获取。
英文摘要:
Large Language Models (LLMs) have seen an impressive wave of advances recently, with models now excelling in a variety of tasks, such as mathematical reasoning and program synthesis. However, their potential to effectively use tools via API calls remains unfulfilled. This is a challenging task even for today's state-of-the-art LLMs such as GPT-4, largely due to their inability to generate accurate input arguments and their tendency to hallucinate the wrong usage of an API call. We release Gorilla, a finetuned LLaMA-based model that surpasses the performance of GPT-4 on writing API calls. When combined with a document retriever, Gorilla demonstrates a strong capability to adapt to test-time document changes, enabling flexible user updates or version changes. It also substantially mitigates the issue of hallucination, commonly encountered when prompting LLMs directly. To evaluate the model's ability, we introduce APIBench, a comprehensive dataset consisting of HuggingFace, TorchHub, and TensorHub APIs. The successful integration of the retrieval system with Gorilla demonstrates the potential for LLMs to use tools more accurately, keep up with frequently updated documentation, and consequently increase the reliability and applicability of their outputs. Gorilla's code, model, data, and demo are available at https://gorilla.cs.berkeley.edu
机构、总结、中文摘要均由AI分析而来,可能存在错误,请以论文正文为准。