arXiv:2412.11919cs.CLcs.AI2024-12ACL被引 29

让大模型生成时直接检索细粒度证据,减少幻觉。

RetroLLM: Empowering Large Language Models to Retrieve Fine-grained Evidence within Generation

  • 将检索与生成融合,用约束解码直接生成细粒度证据。
  • 在5个开放域问答数据集上超越现有方法,尤其在跨域任务表现优异。
  • 适合需要高准确性和可解释性的生成场景,如医疗、法律问答。

大型语言模型虽具强大生成能力,但常出现幻觉。检索增强生成(RAG)通过引入外部知识提供有效解决方案,但现有方法仍存在额外部署成本、检索文本冗余输入令牌,以及检索与生成未联合优化等问题。为此,我们提出 extbf{RetroLLM},一个将检索与生成统一为单一流程的框架,使大模型能通过约束解码直接从语料库中生成细粒度证据。为缓解约束生成中的误剪枝问题,我们引入:(1) 层次化 FM-Index 约束,预先生成相关文档子集线索,缩小无关解码空间;(2) 前瞻性约束解码策略,考虑未来序列的相关性以提升证据准确性。在五个开放域问答数据集上的大量实验表明,RetroLLM 在域内与跨域任务中均表现卓越。代码已开源。

原文摘要 · Abstract (English)

Large language models (LLMs) exhibit remarkable generative capabilities but often suffer from hallucinations. Retrieval-augmented generation (RAG) offers an effective solution by incorporating external knowledge, but existing methods still face several limitations: additional deployment costs of separate retrievers, redundant input tokens from retrieved text chunks, and the lack of joint optimization of retrieval and generation. To address these issues, we propose \textbf{RetroLLM}, a unified framework that integrates retrieval and generation into a single, cohesive process, enabling LLMs to directly generate fine-grained evidence from the corpus with constrained decoding. Moreover, to mitigate false pruning in the process of constrained evidence generation, we introduce (1) hierarchical FM-Index constraints, which generate corpus-constrained clues to identify a subset of relevant documents before evidence generation, reducing irrelevant decoding space; and (2) a forward-looking constrained decoding strategy, which considers the relevance of future sequences to improve evidence accuracy. Extensive experiments on five open-domain QA datasets demonstrate RetroLLM's superior performance across both in-domain and out-of-domain tasks. The code is available at \url{https://github.com/sunnynexus/RetroLLM}.

大模型检索生成约束解码

Thank you to arXiv for use of its open access interoperability. PaperDance 不是 arXiv 官方产品;中文卡片由大模型生成,请以原文为准。