ChatPaper.aiChatPaper

Agent-FLAN:設計用於大型語言模型的有效代理調整的數據和方法

Agent-FLAN: Designing Data and Methods of Effective Agent Tuning for Large Language Models

March 19, 2024
作者: Zehui Chen, Kuikun Liu, Qiuchen Wang, Wenwei Zhang, Jiangning Liu, Dahua Lin, Kai Chen, Feng Zhao
cs.AI

摘要

開源的大型語言模型(LLMs)在各種自然語言處理任務中取得了巨大成功,然而,當充當代理時,它們仍遠遠不及基於API的模型。如何將代理能力整合到一般的LLMs中變得至關重要且迫切。本文首先提出三個關鍵觀察結果:(1)當前的代理訓練語料庫既包含遵循格式又包含代理推理,這與其預訓練數據的分佈明顯不同;(2)LLMs在代理任務所需的能力上表現出不同的學習速度;以及(3)通過引入幻覺來提高代理能力的當前方法存在副作用。基於上述發現,我們提出Agent-FLAN,以有效地對語言模型進行Fine-tune以用於代理。通過對訓練語料庫進行細致的分解和重新設計,Agent-FLAN使Llama2-7B在各種代理評估數據集上比先前最佳成果提高了3.5%。通過全面構建負樣本,Agent-FLAN在我們建立的評估基準上極大地緩解了幻覺問題。此外,當擴展模型大小時,Agent-FLAN持續提高LLMs的代理能力,同時稍微增強了LLMs的一般能力。代碼將在https://github.com/InternLM/Agent-FLAN 上提供。
English
Open-sourced Large Language Models (LLMs) have achieved great success in various NLP tasks, however, they are still far inferior to API-based models when acting as agents. How to integrate agent ability into general LLMs becomes a crucial and urgent problem. This paper first delivers three key observations: (1) the current agent training corpus is entangled with both formats following and agent reasoning, which significantly shifts from the distribution of its pre-training data; (2) LLMs exhibit different learning speeds on the capabilities required by agent tasks; and (3) current approaches have side-effects when improving agent abilities by introducing hallucinations. Based on the above findings, we propose Agent-FLAN to effectively Fine-tune LANguage models for Agents. Through careful decomposition and redesign of the training corpus, Agent-FLAN enables Llama2-7B to outperform prior best works by 3.5\% across various agent evaluation datasets. With comprehensively constructed negative samples, Agent-FLAN greatly alleviates the hallucination issues based on our established evaluation benchmark. Besides, it consistently improves the agent capability of LLMs when scaling model sizes while slightly enhancing the general capability of LLMs. The code will be available at https://github.com/InternLM/Agent-FLAN.
PDF181December 15, 2024