arXivDaily arXiv每日学术速递 周一至周五更新
arXiv 2312.05708cs.IRcs.AIcs.LG
收藏

面向检索增强生成的上下文调优

Context Tuning for Retrieval Augmented Generation

Apple(苹果公司)

Raviteja Anantha, Tharun Bethi, Danil Vodianik, Srinivas Chappidi

AI总结:

针对RAG工具检索依赖完整查询的问题,提出Context Tuning,利用多信号轻量级上下文检索及RRF与LambdaMART融合,显著提升Recall@K、规划准确率并减少幻觉。

摘要:

大型语言模型(LLM)具有仅凭少量示例即可解决新任务的卓越能力,但它们需要能够访问合适的工具。检索增强生成(RAG)通过为给定任务检索一系列相关工具来解决这一问题。然而,RAG的工具检索步骤要求所有必要信息都明确出现在查询中。这是一种局限,因为语义搜索作为被广泛采用的工具检索方法,在查询不完整或缺乏上下文时可能失败。为解决这一局限,我们提出了面向RAG的Context Tuning(上下文调优),它采用智能上下文检索系统获取相关信息,从而同时改进工具检索和计划生成。我们的轻量级上下文检索模型利用数值、类别和习惯性使用信号来检索并排序上下文条目。实证结果表明,上下文调优显著增强了语义搜索,在上下文检索和工具检索任务上分别实现了Recall@K 3.5倍和1.5倍的提升,并使基于LLM的规划器准确率提高11.6%。此外,我们表明,所提出的轻量级模型结合Reciprocal Rank Fusion(RRF,倒数排名融合)与LambdaMART,优于基于GPT-4的检索。而且,我们观察到即使在工具检索之后,在计划生成阶段进行上下文增强也能减少幻觉。

英文摘要:

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.

机构、总结、中文摘要均由AI分析而来,可能存在错误,请以论文正文为准。

↑