Reading the Generator's Own Verdict on Its Retrieved Context

Retrieval-augmented generation (RAG) means handing a language model a few documents fetched from a search index along with the question, so it can answer from evidence instead of memory. It fails in three distinct ways. The documents may support the right answer and the model still ignores them. The documents may not contain the answer and the model invents one anyway. Or the documents may be wrong, and the model repeats the error even though it knew better. Current fixes treat these as one problem. Methods that push the model to attend harder to its context fix the first failure and make the third worse. Upstream filters remove "irrelevant" text, but some irrelevant text actually helps. This proposal asks whether a large model already knows, in its hidden activations, which of these three situations it is in. If it does, that signal can decide which correction to apply.

The concrete bet is a small linear probe. It reads the generator's own hidden state once the question and documents have been processed, and classifies the context as supporting, lacking the answer, or contradicting what the model knows. The predicted class then routes generation. Supporting contexts get an attention boost toward the documents. Contexts lacking the answer lead to abstention. Contradicting contexts lead the model to answer from memory or flag the conflict. We test this at 8B and 70B scale, because the evidence suggests the relevant internal distinctions sharpen with size. Whether a cheap readout of them beats simply prompting a 70B model to be careful is the question the experiments are built to settle.

Core Claim

Two prior results motivate the claim. The first is that hidden states for questions a model knows versus does not know are linearly separable. CASAL used this to train abstention into a single MLP layer, but only for closed-book short-form QA with no documents in the prompt. The second is that scale changes how models treat noisy context. Pandora's Box or Aladdin's Lamp built NoiserBench, a benchmark of seven linguistic noise types. It found that Llama3-70B uses off-topic passages as contrastive foils while 8B models are distracted by them. It also found that all models collapse under counterfactual passages: Llama3-8B falls from 80.00% to 36.33% on RGB. Ungrammatical noise even raises Llama3-8B accuracy from 86.57% to 89.89%.

Our claim has three parts. First, a three-way context verdict is linearly decodable from mid-layer residual activations. Second, it becomes more decodable at 70B than at 8B. Third, gating the intervention on this verdict reduces hallucination on counterfactual and answer-absent contexts without the regressions that unconditional context steering causes. A key detail is that the verdict should not fire on beneficial noise such as broken sentences or code snippets. A similarity filter cannot draw that distinction, and an "extract only answer-bearing sentences" policy erases it.

Research Program

Training data. We build probe data from Natural Questions and TriviaQA. Each question is labeled by whether the model answers it correctly closed-book; this is a CASAL-style "known" signal. Each question is then paired with three context conditions. The supporting condition contains gold passages plus retrieved distractors. The answer-absent condition contains only retrieved distractors. The conflicting condition contains a gold passage with the answer entity substituted, following RGB's counterfactual construction in Benchmarking Large Language Models in Retrieval-Augmented Generation. The probe is a logistic regression on the residual stream at the final prompt token. We fit it per layer for Llama-3.1-8B and Llama-3.1-70B, and for Qwen2.5-72B as a second family.

Diagnostic question. Before any intervention, we ask where in depth the verdict becomes readable and whether its accuracy rises with scale. We also ask whether "conflicting" separates from "lacking the answer" only when the model knows the true fact closed-book. That last result is what we expect if the verdict reflects comparison against parametric memory rather than surface cues about counterfeit text. We also test whether NoiserBench's beneficial noise types are classified as "supporting" rather than as conflict. If they are not, the probe has learned "context looks odd" rather than "context is wrong."

Intervention. For the routing step we reuse existing mechanisms rather than invent new ones. In the supporting case we apply the closed-loop attention steering of COMPASS, which adds a bias to selected attention heads to raise attention on context tokens. In the answer-absent case we emit an abstention. In the conflicting case we regenerate without context when the known-probe is confident, and otherwise abstain with a conflict flag. The routing is training-free beyond the probe. This keeps the cost to one extra matrix-vector product per query, apart from conflict cases, which need one context-free regeneration.

Baselines

The do-nothing reference is standard retrieve-then-generate with the same retriever, the same top-k, and the same prompt at each scale. Every other number is reported as a change against it.

The strongest existing upstream competitor is InfoGain-RAG. It trains a 355M reranker on Document Information Gain, defined as the shift in the generator's confidence in the right answer with versus without a passage. It filters low-gain passages before generation. On TriviaQA with Qwen2.5-72B it reports accuracy gains of 16.4% over naive RAG and 2.9% over the GTE reranker. We run it with its published reranker over the same candidate pool. We also report a DIG reranker retrained on our generators' probabilities, giving it the same number of labeled questions our probe uses. Beating it means matching its accuracy on clean and supporting conditions while showing lower hallucination on conflicting and answer-absent conditions, where a relevance filter has no principled reason to help.

The strongest existing generator-side competitor is unconditional COMPASS steering. It isolates the cost of steering toward context without knowing whether the context is trustworthy. COMPASS reports a 22.4% reduction in span density of unsupported claims for LLaMA-2-13B on RAGTruth. It reports no result at 70B, so we found no reported result on Lacuna for COMPASS at 70B scale and will run it ourselves with matched head selection.

We include ConfRAG as the calibrated-abstention reference at 70B. Its ConfQA fine-tuning reports hallucination below 5% on closed-book factuality benchmarks with Llama-3.1-70B. It assumes the triggered context is clean, so we evaluate it directly on our conflicting condition.

The ablation that isolates the key ingredient replaces the three-way probe with a two-way known/unknown probe. A two-way probe is CASAL's signal applied in a RAG setting. If routing on two classes does as well as three, the conflict-versus-absent distinction is not pulling its weight.

Why not just…?

Why not just prompt the 70B model to check the documents against what it knows and refuse if they conflict? This is the most serious threat, because large instruction-tuned models may already do this when asked. The material is discouraging but not decisive. RGB reports that ChatGPT rejects unanswerable questions only about 45% of the time and corrects counterfactual context at a 57.14% rate. ConfRAG finds that self-reported confidence is systematically inflated. Neither tested an explicit verify-against-memory prompt on Llama-3.1-70B. We run exactly that prompt as a baseline with the same few-shot budget. If it matches the probe at 70B but not at 8B, we report that as the finding: scale makes the verdict available to the output channel. The probe's contribution then shrinks to the smaller models and to latency.

Why not just answer closed-book and with RAG, and flag disagreement? This baseline is close to a cheap surface version of our probe, and no reported result on Lacuna was found for it on RGB or NoiserBench. Disagreement cannot tell "context is wrong" from "model's memory is wrong." It also costs a full second generation on every query, not only on conflicts. We implement it with known-probe confidence as the tiebreaker. The test is whether the internal verdict wins specifically on items where the closed-book answer is low-confidence. If it does not, the extra machinery is unjustified and we say so.

Why not just filter harder upstream with a reranker or an extract-then-generate model? Ext2Gen trains Llama3.1-8B to extract supporting sentences from up to 25 distractor chunks before answering, reaching an average QA score of 0.557 against 0.473. However, it treats every non-answer sentence as noise. Under NoiserBench that discards beneficial noise. A counterfactual passage is also maximally "answer-bearing," so extraction keeps it. Our per-noise-type breakdown shows directly whether filtering helps or hurts on each of the seven types.

Proposed Experiments

The decisive diagnostic is probe accuracy by layer and scale on held-out RGB and NoiserBench items. The probe is trained only on the NQ and TriviaQA construction, so this also tests transfer. A supporting result is above-chance three-way accuracy whose conflict-versus-absent separation is larger at 70B. A refuting result is a probe that separates the classes only by detecting substituted entities, which the known/unknown stratification will reveal.

The decisive downstream checks use RGB's four abilities: noise robustness, negative rejection, counterfactual robustness, and integration. They also use NoiserBench's seven noise types, CRAG's false-premise and tail-entity slices, and RAGTruth span-level hallucination rates for long-form output. On CRAG, straightforward RAG reportedly reaches about 44% accuracy with truthfulness around 13.4%, per CRAG. We report CRAG's truthfulness score so that abstentions are credited and wrong answers penalized.

The proposal succeeds if three things hold for verdict routing on the 70B models. It must raise RGB counterfactual correction and negative rejection above both unconditional steering and the verify-against-memory prompt. It must not lose clean-condition accuracy relative to InfoGain-RAG. And it must leave accuracy on ISN and datatype noise unchanged or improved. If the prompt baseline ties at 70B, the result we will defend is the scaling finding together with the cost comparison, not a mitigation method.