要約
検索拡張生成(RAG)は、LLMコンテキストにドキュメントの検索を可能にして、より正確で関連性のある応答を提供することにより、大規模な言語モデル(LLM)の能力を高めます。
既存のRAGソリューションでは、実質的に異なるコンテンツを持つ複数のドキュメントを取得する必要があるクエリに焦点を当てていません。
このようなクエリは頻繁に発生しますが、これらのドキュメントの埋め込みが埋め込みスペースに遠くにある可能性があり、それらすべてを取得するのが難しくなる可能性があるため、困難です。
このペーパーでは、このギャップに対処するために設計された新しいスキームであるマルチヘッドラグ(MRAG)を紹介します。これは、デコーダー層の代わりにトランスのマルチヘッド注意層のアクティブ化を、マルチアセプタードキュメントを取得するためのキーとして活性化することです。
駆動観察は、さまざまな注意ヘッドがさまざまなデータの側面をキャプチャすることを学ぶことです。
対応するアクティベーションを活用すると、データ項目やクエリのさまざまなファセットを表す埋め込みが生じ、複雑なクエリの検索精度が向上します。
MRAGの有効性を実証するために、評価方法とメトリック、マルチアスペクトデータセット、および実際のユースケースを提供します。
MRAGの設計上の18のラグベースライン、検索成功率の最大20%の経験的改善、および下流のLLM世代の利点を示しています。
MRAGは、既存のRAGフレームワークやベンチマークとシームレスに統合できます。
要約(オリジナル)
Retrieval Augmented Generation (RAG) enhances the abilities of Large Language Models (LLMs) by enabling the retrieval of documents into the LLM context to provide more accurate and relevant responses. Existing RAG solutions do not focus on queries that may require fetching multiple documents with substantially different contents. Such queries occur frequently, but are challenging because the embeddings of these documents may be distant in the embedding space, making it hard to retrieve them all. This paper introduces Multi-Head RAG (MRAG), a novel scheme designed to address this gap with a simple yet powerful idea: leveraging activations of Transformer’s multi-head attention layer, instead of the decoder layer, as keys for fetching multi-aspect documents. The driving observation is that different attention heads learn to capture different data aspects. Harnessing the corresponding activations results in embeddings that represent various facets of data items and queries, improving the retrieval accuracy for complex queries. We provide an evaluation methodology and metrics, multi-aspect datasets, and real-world use cases to demonstrate MRAG’s effectiveness. We show MRAG’s design advantages over 18 RAG baselines, empirical improvements of up to 20% in retrieval success ratios, and benefits for downstream LLM generation. MRAG can be seamlessly integrated with existing RAG frameworks and benchmarks.
arxiv情報
著者 | Maciej Besta,Ales Kubicek,Robert Gerstenberger,Marcin Chrapek,Roman Niggli,Patrik Okanovic,Yi Zhu,Patrick Iff,Michal Podstawski,Lucas Weitzendorf,Mingyuan Chi,Joanna Gajda,Piotr Nyczyk,Jürgen Müller,Hubert Niewiadomski,Torsten Hoefler |
発行日 | 2025-06-05 15:57:36+00:00 |
arxivサイト | arxiv_id(pdf) |
提供元, 利用サービス
arxiv.jp, Google