arXivDaily arXiv每日学术速递 周一至周五更新
arXiv周末暂无论文更新,休息一下吧,周末愉快~~
arXiv 2503.16071cs.CLcs.AIcs.IR
收藏

基于RAG原理微调大语言模型:迈向LLM原生记忆

Tuning LLMs by RAG Principles: Towards LLM-native Memory

Jiale Wei, Shuchi Wu, Ruochen Liu, Xiang Ying, Jingbo Shang, Fangbo Tao

AI总结:

针对LLM记忆融入问题,本文对比长上下文LLM与RAG两类方案的优劣,提出用RAG原理生成数据微调小规格LLM的RAG-Tuned-LLM方法,实现多查询类型下性能超越两类主流方案。

摘要:

记忆是大语言模型(LLM)训练之外的额外信息,对个人助理等各类实际应用至关重要。将记忆融入生成过程的两类主流方案是长上下文LLM和检索增强生成(RAG)。本文首先在三个经过改造/全新的数据集上系统比较了这两类方案,结果表明:(1)长上下文方案尽管成本更高,但更易把握全局,能更好地回答需要将记忆作为整体考虑的查询;(2)当查询涉及特定信息时,RAG方案更具竞争力,尤其是在关键词可明确匹配的情况下。据此,我们提出了一种新方法RAG-Tuned-LLM,该方法遵循RAG原理生成数据,用其微调规模相对较小(如7B)的LLM,从而结合两类方案的优势。在三个数据集上的大量实验表明,RAG-Tuned-LLM在各类查询类型上均能优于长上下文LLM和RAG方法。

英文摘要:

Memory, additional information beyond the training of large language models (LLMs), is crucial to various real-world applications, such as personal assistant. The two mainstream solutions to incorporate memory into the generation process are long-context LLMs and retrieval-augmented generation (RAG). In this paper, we first systematically compare these two types of solutions on three renovated/new datasets and show that (1) long-context solutions, although more expensive, shall be easier to capture the big picture and better answer queries which require considering the memory as a whole; and (2) when the queries concern specific information, RAG solutions shall be more competitive especially when the keywords can be explicitly matched. Therefore, we propose a novel method RAG-Tuned-LLM which fine-tunes a relative small (e.g., 7B) LLM using the data generated following the RAG principles, so it can combine the advantages of both solutions. Extensive experiments on three datasets demonstrate that RAG-Tuned-LLM can beat long-context LLMs and RAG methods across a wide range of query types.

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

↑