Skip to main content
QUICK REVIEW

[論文レビュー] Long Context RAG Performance of Large Language Models

Quinn Leng, Jacob Portes|arXiv (Cornell University)|Nov 5, 2024
Topic Modeling被引用数 5
ひとこと要約

本論文は、文脈長を増加させたときの Retrieval-Augmented Generation (RAG) の性能への影響を、3つのデータセットにわたって20のLLMで体系的に評価し、長い文脈が最先端モデルのいくつかには有効である一方で、ほとんどのオープンソースモデルには必ずしも有効ではなく、さまざまな失敗モードが観察されたことを見出している。

ABSTRACT

Retrieval Augmented Generation (RAG) has emerged as a crucial technique for enhancing the accuracy of Large Language Models (LLMs) by incorporating external information. With the advent of LLMs that support increasingly longer context lengths, there is a growing interest in understanding how these models perform in RAG scenarios. Can these new long context models improve RAG performance? This paper presents a comprehensive study of the impact of increased context length on RAG performance across 20 popular open source and commercial LLMs. We ran RAG workflows while varying the total context length from 2,000 to 128,000 tokens (and 2 million tokens when possible) on three domain-specific datasets, and report key insights on the benefits and limitations of long context in RAG applications. Our findings reveal that while retrieving more documents can improve performance, only a handful of the most recent state of the art LLMs can maintain consistent accuracy at long context above 64k tokens. We also identify distinct failure modes in long context scenarios, suggesting areas for future research.

研究の動機と目的

  • より長い文脈長が広範なLLMのセットにおいてRAG性能を改善するかを評価する。
  • 文脈が2,000トークンから128,000トークンへ拡大するにつれて、(モデルによっては最大2,000,000トークンまで)性能がどのように変化するかを定量化する。
  • 複数の領域にまたがる長文脈RAGシナリオにおける、モデル固有の失敗モードと制限を特定する。

提案手法

  • 2kから128kトークン(可能な場合は最大2Mトークン)までの文脈長で、20のオープンソースおよび商用LLMをベンチマークする。
  • 固定の埋め込みモデルとFAISSベクタストアを用いた標準のRAGパイプラインで文書チャンクを検索する。
  • 生成された回答を、校正済みのLLMを審査者として評価する(GPT-4o)ことにより、正解回答と比較する。
  • モデル出力の定性的分類によって、recall@kの検索性能と失敗モードを分析する。
Figure 1 : Long context RAG performance of o1, GPT-4, Claude 3/3.5, Gemini 1.5 ( gemini-1.5-pro-001 and gemini-1.5-flash-001 ), Llama 3/3.1, Qwen 2, Mistral and DBRX models on 3 curated RAG datasets (Databricks DocsQA, FinanceBench, and Natural Questions). All values can be found in Table S3 . Model
Figure 1 : Long context RAG performance of o1, GPT-4, Claude 3/3.5, Gemini 1.5 ( gemini-1.5-pro-001 and gemini-1.5-flash-001 ), Llama 3/3.1, Qwen 2, Mistral and DBRX models on 3 curated RAG datasets (Databricks DocsQA, FinanceBench, and Natural Questions). All values can be found in Table S3 . Model

実験結果

リサーチクエスチョン

  • RQ1長文脈LLMは、多様なモデルとデータセットにわたって一貫してRAG性能を改善できるか?
  • RQ2最先端モデルとオープンソースモデルで、文脈長が性能に与えるスケーリングはどうなるか?
  • RQ3異なるモデルと文脈における長文脈RAGの主要な失敗モードは何か?
  • RQ4追加の取得文書が望ましい成果をもたらさなくなる実用的な文脈長の閾値はあるか?

主な発見

  • 長文脈は最近の最先端モデル(例:o1、GPT-4o、Claude 3.5、Gemini 1.5、Qwen 2 70B)でRAG性能を向上させるが、すべてのモデルに一様には適用されない。
  • ほとんどのオープンソースモデルは約16k〜32kトークンまでの性能向上を示し、それより長い文脈では劣化する。
  • Gemini 1.5 Pro/Flash は、他の多くの同僚とは異なり、一部タスクで非常に長い文脈(最大2,000,000トークン)まで一貫した性能を維持する。
  • 共通の失敗モードには、著作権懸念による拒否、セーフティフィルター、指示に従わない失敗が含まれ、モデルごとにパターンがある。
  • リトリーバルのリコールは、高い文脈長で飽和することがあり(DocsQAとFinanceBenchで96k〜128kトークン程度まで)、生成性能が単調に上昇しない場合でもそうなる。
  • 長文脈長で非常に大きなコーパスを直接一部のLLMに入力することは理論上は可能だが、コストが大きな要因である。
Figure 2 : Long context RAG performance on FinanceBench
Figure 2 : Long context RAG performance on FinanceBench

より良い研究を、今すぐ始めましょう

論文設計から論文執筆まで、研究時間を劇的に削減しましょう。

クレジットカード登録不要

このレビューはAIが作成し、人間の編集者が確認しました。