[论文解读] DRAGIN: Dynamic Retrieval Augmented Generation based on the Information Needs of Large Language Models
DRAGIN 引入 实时信息需求检测(RIND)和基于自注意力的查询表述(QFS),以动态决定何时以及检索何种信息,在无需额外训练的情况下,在四个知识密集型基准上取得了显著结果。
Dynamic retrieval augmented generation (RAG) paradigm actively decides when and what to retrieve during the text generation process of Large Language Models (LLMs). There are two key elements of this paradigm: identifying the optimal moment to activate the retrieval module (deciding when to retrieve) and crafting the appropriate query once retrieval is triggered (determining what to retrieve). However, current dynamic RAG methods fall short in both aspects. Firstly, the strategies for deciding when to retrieve often rely on static rules. Moreover, the strategies for deciding what to retrieve typically limit themselves to the LLM's most recent sentence or the last few tokens, while the LLM's real-time information needs may span across the entire context. To overcome these limitations, we introduce a new framework, DRAGIN, i.e., Dynamic Retrieval Augmented Generation based on the real-time Information Needs of LLMs. Our framework is specifically designed to make decisions on when and what to retrieve based on the LLM's real-time information needs during the text generation process. We evaluate DRAGIN along with existing methods comprehensively over 4 knowledge-intensive generation datasets. Experimental results show that DRAGIN achieves superior performance on all tasks, demonstrating the effectiveness of our method. We have open-sourced all the code, data, and models in GitHub: https://github.com/oneal2000/DRAGIN/tree/main
研究动机与目标
- 通过在生成过程中更智能地调取检索来减少LLM幻觉的动机。
- 发展一个动态RAG框架,根据实时信息需求决定何时检索。
- 使用LLM的自注意力来形成检索查询,以捕捉跨上下文的信息需求。
- 在不需要额外训练或提示工程的情况下实现与基于Transformer的LLM的整合。
- 在多种知识密集型任务上,实证验证DRAGIN相对于现有动态RAG基线的表现。
提出的方法
- 提出 Real-time Information Needs Detection (RIND),用不确定性、标记重要性和语义贡献对每个生成的令牌进行打分,以触发检索。
- 引入基于自注意力的查询表述(QFS),从触发位置的前面最受关注的令牌中构建查询。
- 在生成过程中的令牌层面做出检索决策,使用RIND分数阈值来决定何时检索。
- 使用轻量的后截断整合:在触发点截断生成,检索外部知识,并使用专门的提示模板继续生成。
- 将DRAGIN与基线动态RAG方法在四个知识密集型数据集、跨多个LLM(LLaMA-2-13B/7B-chat与Vicuna-13B-v1.5)进行对比评估。
- 注:默认使用BM25作为检索器,消融包含SGPT。
实验结果
研究问题
- RQ1实时、基于需求的检索触发是否能在性能上优于静态或固定间隔方法?
- RQ2基于自注意力的查询表述是否比基于最后一句或最后一个令牌的查询更好地捕捉整个上下文的信息需求?
- RQ3在多数据集和多种LLM上,DRAGIN在准确性(EM/F1/Accuracy)和效率方面相较于现有动态RAG方法表现如何?
主要发现
- DRAGIN 在四个知识密集型数据集、多个LLM上持续优于基线,表明实时需求检测和自注意力查询的有效性。
- DRAGIN 在所测试的动态RAG方法中达到最先进的性能,特别是在多步问答任务(2WikiMultihopQA、HotpotQA)。
- 消融研究表明RIND和QFS在不同检索器和LLMs上优于现有的时机和查询策略。
- DRAGIN 使用BM25作为检索器,并在LLaMA-2-13B/7B-chat和Vicuna-13B-v1.5上展示结果。
- 时序实验表明,在使用可比查询时,DRAGIN的触发机制在IIRC数据集上的EM/F1/Accuracy优于FLARE、FL-RAG和FS-RAG。
- 使用全上下文的查询表述不如DRAGIN的QFS方法有效,后者从先前上下文中选择顶部关注的令牌。
阅读本论文
在 Nubint 阅读器中打开原文,边读边就任意段落提问。
在 Nubint 中阅读本论文本解读由 AI 根据论文原文生成,引用前请核对原文。