RAFT: Adapting Language Model to Domain Specific RAG

要約

大規模言語モデル (LLM) をテキスト データの大規模コーパスで事前トレーニングすることは、現在では標準的なパラダイムです。
これらの LLM を多くのダウンストリーム アプリケーションに使用する場合、RAG ベースのプロンプトまたは微調整を通じて、事前トレーニング済みモデルに新しい知識 (タイム クリティカルなニュースやプライベート ドメインの知識など) を追加で焼き込むのが一般的です。
ただし、モデルがそのような新しい知識を取得するための最適な方法論は未解決の問題のままです。
このペーパーでは、「オープンブック」ドメイン内設定での質問に答えるモデルの能力を向上させるトレーニング レシピである、検索拡張ファインチューニング (RAFT) を紹介します。
RAFT では、質問と取得した一連の文書を指定して、質問に答えるのに役立たない文書 (これを「注意をそらす文書」と呼びます) を無視するようにモデルをトレーニングします。
RAFT は、質問への回答に役立つ関連文書から正しいシーケンスをそのまま引用することでこれを実現します。
これに RAFT の思考連鎖スタイルの応答を組み合わせることで、モデルの推論能力が向上します。
ドメイン固有の RAG では、RAFT は PubMed、HotpotQA、Gorilla データセット全体でモデルのパフォーマンスを一貫して向上させ、事前トレーニングされた LLM をドメイン内の RAG に改善するためのトレーニング後のレシピを提示します。
RAFT のコードとデモは、github.com/ShishirPatil/gorilla でオープンソース化されています。

要約(オリジナル)

Pretraining Large Language Models (LLMs) on large corpora of textual data is now a standard paradigm. When using these LLMs for many downstream applications, it is common to additionally bake in new knowledge (e.g., time-critical news, or private domain knowledge) into the pretrained model either through RAG-based-prompting, or fine-tuning. However, the optimal methodology for the model to gain such new knowledge remains an open question. In this paper, we present Retrieval Augmented FineTuning (RAFT), a training recipe that improves the model’s ability to answer questions in a ‘open-book’ in-domain settings. In RAFT, given a question, and a set of retrieved documents, we train the model to ignore those documents that don’t help in answering the question, which we call, distractor documents. RAFT accomplishes this by citing verbatim the right sequence from the relevant document that would help answer the question. This coupled with RAFT’s chain-of-thought-style response helps improve the model’s ability to reason. In domain-specific RAG, RAFT consistently improves the model’s performance across PubMed, HotpotQA, and Gorilla datasets, presenting a post-training recipe to improve pre-trained LLMs to in-domain RAG. RAFT’s code and demo are open-sourced at github.com/ShishirPatil/gorilla.

arxiv情報

著者 Tianjun Zhang,Shishir G. Patil,Naman Jain,Sheng Shen,Matei Zaharia,Ion Stoica,Joseph E. Gonzalez
発行日 2024-03-15 09:26:02+00:00
arxivサイト arxiv_id(pdf)

提供元, 利用サービス

arxiv.jp, Google

カテゴリー: cs.AI, cs.CL パーマリンク