cs.CLAug 27, 2026

Knowing Before Answering: Decoding Language Models for Reliable RAG

Authors: Syed Mahbubul Huq, Christopher Child, Tillman Weyde, Pranava Madhyastha

Organizations: City St George’s, University of London · The Alan Turing Institute

Abstract

In Retrieval-Augmented Generation (RAG), retrieval may provide insufficient or conflicting information needed to answer a question. The system should not only know when to answer but also be able to identify cases in which the documents provided in RAG are insufficient or contain conflicting information. This can be framed as a three-way classification problem, where we use the model's internal signals to determine whether the provided information in the input can be classified as sufficient, insufficient, or conflicting. We create a controlled benchmark dataset that replicates a RAG setup with fictitious information and labels each instance as answerable, insufficient, or conflicting. We use hidden activations and attention-derived features as inputs to train a lightweight linear model to distinguish among the three classes. Across 16 language models spanning different architectures and a range of model sizes, our feature-based router consistently outperforms prompting-based baselines and the performance of specialised RAG-models. We further conduct analyses into the information dynamics of the models. We show that the most informative signals for the classification are available in the middle layers, with hidden activation states being more effective than attention values or the MLP-feature outputs in most of the tested models. Overall, our results suggest that language models internally encode whether retrieved evidence is sufficient to support answering, and that this signal can be decoded reliably for RAG triage.

Figures & tables

Appendix figures & tables13 assets

Supplementary material from the paper’s appendix.

Appendix

Explore similar work

CardsList
  1. AB-RAG: Adaptive Budgeted Retrieval-Augmented Generation for Reliable Question Answering

    Jun 27, 2026Ansh KamthanRetrieval-Augmented GenerationLLM Answer Verification

  2. Relevance Is Not Sufficient Evidence: Detecting Evidence Gaps Before Generation in RAG

    Sep 27, 2026Suting Chen, Peichun Hua, Yunming XiaoRetrieval-Augmented GenerationEvidence-Grounded QA

  3. Parameters vs. Context: TRACE Fine-Tuning for Robust Retrieval-Augmented Generation

    Sep 24, 2026Zhengchen Huang, Yundong Sun, Minrui Song +4RAG RobustnessRetrieval-Augmented Generation