Context Tuning for Retrieval Augmented Generation

Raviteja Anantha, Tharun Bethi, Danil Vodianik, Srinivas Chappidi
12/9/2023
cs.IRcs.AIcs.LG

No confident code implementation found for this paper. 4 possible matches can be shown below.

Abstract

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.

View on arXivView PDF

Code Implementations

No confident code match yet

We couldn't find an author-owned or strongly-evidenced community implementation for this paper. 4 weaker matches are hidden by default — verify before relying on them.

No code implementations found yet.

Know of an implementation? Let us know in the comments below!

Similar Papers

Cite this paper

@article{anantha2023context,
  title  = {Context Tuning for Retrieval Augmented Generation},
  author = {Raviteja Anantha and Tharun Bethi and Danil Vodianik and Srinivas Chappidi},
  year   = {2023},
  eprint = {2312.05708},
  archivePrefix = {arXiv},
  url    = {http://arxiv.org/abs/2312.05708v1}
}

Add a badge to your README

Shows whether official code is linked for this paper.

Code of Paper badge
[![Code of Paper](https://codeofpaper.com/badge/2312.05708.svg)](https://codeofpaper.com/paper/2312.05708)

Discussion