検索拡張生成のためのコンテキストチューニング
Context Tuning for Retrieval Augmented Generation
December 9, 2023
著者: Raviteja Anantha, Tharun Bethi, Danil Vodianik, Srinivas Chappidi
cs.AI
要旨
大規模言語モデル(LLM)は、わずかな例だけで新しいタスクを解決する驚異的な能力を持っていますが、適切なツールへのアクセスが必要です。Retrieval Augmented Generation(RAG)は、与えられたタスクに対して関連するツールのリストを取得することでこの問題に対処します。しかし、RAGのツール取得ステップでは、必要な情報がすべて明示的にクエリに含まれている必要があります。これは、広く採用されているツール取得方法であるセマンティック検索が、クエリが不完全であるか文脈を欠いている場合に失敗する可能性があるため、制限となります。この制限に対処するため、我々はRAGのためのコンテキストチューニングを提案します。これは、スマートなコンテキスト取得システムを使用して、ツール取得とプラン生成の両方を改善する関連情報を取得するものです。我々の軽量なコンテキスト取得モデルは、数値的、カテゴリカル、および習慣的な使用シグナルを使用してコンテキスト項目を取得し、ランク付けします。我々の実証結果は、コンテキストチューニングがセマンティック検索を大幅に向上させ、コンテキスト取得タスクとツール取得タスクのそれぞれでRecall@Kを3.5倍および1.5倍改善し、LLMベースのプランナーの精度を11.6%向上させることを示しています。さらに、我々の提案する軽量モデルが、LambdaMARTとReciprocal Rank Fusion(RRF)を使用することで、GPT-4ベースの取得を上回ることを示します。さらに、ツール取得後でもプラン生成時のコンテキスト拡張が、幻覚を減少させることを観察しました。
English
Large language models (LLMs) have the remarkable ability to solve new tasks
with just a few examples, but they need access to the right tools. Retrieval
Augmented Generation (RAG) addresses this problem by retrieving a list of
relevant tools for a given task. However, RAG's tool retrieval step requires
all the required information to be explicitly present in the query. This is a
limitation, as semantic search, the widely adopted tool retrieval method, can
fail when the query is incomplete or lacks context. To address this limitation,
we propose Context Tuning for RAG, which employs a smart context retrieval
system to fetch relevant information that improves both tool retrieval and plan
generation. Our lightweight context retrieval model uses numerical,
categorical, and habitual usage signals to retrieve and rank context items. Our
empirical results demonstrate that context tuning significantly enhances
semantic search, achieving a 3.5-fold and 1.5-fold improvement in Recall@K for
context retrieval and tool retrieval tasks respectively, and resulting in an
11.6% increase in LLM-based planner accuracy. Additionally, we show that our
proposed lightweight model using Reciprocal Rank Fusion (RRF) with LambdaMART
outperforms GPT-4 based retrieval. Moreover, we observe context augmentation at
plan generation, even after tool retrieval, reduces hallucination.