New method ensures exact quote matching in large language model answers

Guaranteeing Faithful Evidence Extraction in Speculative Retrieval-Augmented Generation

Information Retrieval

Summary

Large language models often make up information instead of sticking exactly to the facts they retrieve. The authors created a new way to make these models only quote text that exactly appears in their source documents. This method ensures that any quoted information is perfectly faithful to the original, which is very important in fields like aircraft maintenance. Although this approach slightly reduces the smoothness of the text, it greatly improves accuracy and safety.

What this means in practice

  • For technical documentation teams: Guarantee that automated answers strictly match certified maintenance documents to prevent errors in aircraft servicing.
  • For legal compliance teams: Ensure that information retrieval systems only produce verbatim quotes from legal texts, improving auditability and trust.

Authors

Quentin Signé, Mohand Boughanem, Jose Moreno, Thiziri Belkacem

Abstract

Large Language Models (LLMs) are increasingly used as interfaces for information retrieval, but they remain prone to hallucinations and faithfulness errors, in which the generated answers diverge from the retrieved evidence. While Retrieval-Augmented Generation (RAG) and recent hybrid or semi-extractive approaches mitigate this issue, they do not guarantee that quoted or extracted spans are verbatim from the retrieved context. This limitation can have severe consequences in safety-critical domains, where answers must exactly match certified documentation. We introduce Constrained Hybrid Decoding (CHyD), a novel faithfulness-first paradigm for speculative RAG. While traditional speculative decoding is optimized for inference speed, CHyD repurposes this architecture to ensure faithful verbatim evidence extraction when the extraction mode is correctly triggered. Our approach enforces hard decoding constraints that restrict generation to continuous spans present in the retrieved documents. This design provides a robust but straightforward guarantee: any explicitly quoted span in the output appears verbatim in the provided context. We evaluate our method across state-of-the-art LLMs on diverse abstractive, extractive, and semi-extractive QA benchmarks, including technical datasets motivated by aircraft maintenance. Results show that existing hybrid methods frequently hallucinate quoted spans, with exact extraction accuracy dropping below 40% in technical domains. In contrast, our approach achieves near-perfect extraction faithfulness regardless of the model used. Although enforcing hard constraints introduces a trade-off with fluency-oriented metrics, our method improves exact answer correctness and remains competitive overall, highlighting its suitability for safety-critical information retrieval applications.