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

Xiaoxi Li, Jiajie Jin, Yujia Zhou, Yongkang Wu, Zhonghua Li +2 more
12/16/2024
cs.CLcs.AIcs.IR

Official code: sunnynexus/RetroLLM (115 stars, MIT, last commit 2025-01-23).

Abstract

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}.

View on arXivView PDF

Code Implementations(1)

MIT

[ACL 2025] RetroLLM: Empowering LLMs to Retrieve Fine-grained Evidence within Generation

1154C++, SWIGDec 13, 20241 years agoMIT

Similar Papers

Cite this paper

@article{li2024retrollm,
  title  = {RetroLLM: Empowering Large Language Models to Retrieve Fine-grained Evidence within Generation},
  author = {Xiaoxi Li and Jiajie Jin and Yujia Zhou and Yongkang Wu and Zhonghua Li and Qi Ye and Zhicheng Dou},
  year   = {2024},
  eprint = {2412.11919},
  archivePrefix = {arXiv},
  url    = {http://arxiv.org/abs/2412.11919v1}
}

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/2412.11919.svg)](https://codeofpaper.com/paper/2412.11919)

Discussion