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)は、様々な自然言語処理(NLP)タスクにおいて大きな成功を収めているが、エージェントとしての振る舞いにおいては、APIベースのモデルに比べてまだ大きく劣っている。一般的なLLMsにエージェント能力を統合する方法は、重要なかつ緊急の課題となっている。本論文では、まず以下の3つの重要な観察結果を示す:(1)現在のエージェント訓練用コーパスは、フォーマットの遵守とエージェント推論が混在しており、事前訓練データの分布から大きく乖離している;(2)LLMsは、エージェントタスクに必要な能力に対して異なる学習速度を示す;(3)現在のアプローチは、エージェント能力を向上させる際に幻覚(hallucination)を引き起こす副作用がある。これらの知見に基づき、我々はエージェント向けに言語モデルを効果的にファインチューニングするためのAgent-FLANを提案する。訓練コーパスの慎重な分解と再設計を通じて、Agent-FLANはLlama2-7Bが様々なエージェント評価データセットにおいて、従来の最良の成果を3.5%上回ることを可能にした。また、包括的に構築されたネガティブサンプルを用いることで、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.