When a retrieval-augmented language model (an LLM that first looks up passages in a document collection and then answers from them) gives a confident wrong answer about an IBM product error or a physics theorem, the cause can be any of three things. The search step may have missed the right document. The right document may have been in front of the model, and the model overrode it with what it already believed. Or the model may have read the right document and still been unable to apply it. Each cause needs a different repair. A miss calls for better retrieval training, an override calls for training the model to trust the context, and an application failure calls for worked examples of how to use the passage. Current methods that build targeted synthetic training data from a model's mistakes treat all failures alike. They generate more data "near the failures" without asking why the failure happened.
This proposal sorts every failure of a domain retrieval-augmented system into one of these three causes, using cheap tests that need no human labels. It then spends a fixed budget of synthetic training examples according to the cause. The central claim can be tested directly: at equal data budget, cause-routed augmentation should reduce hallucinations more than failure-targeted augmentation that ignores cause. The reason is that the dominant cause differs sharply across domains, and a mismatched repair is wasted. If the claim fails, we learn something useful too. It would mean that the specific repair matters less than prior work suggests, and that any failure-adjacent data helps equally.
Core Claim
Three bodies of evidence motivate the split. First, retrieval itself breaks on long, jargon-heavy domain questions: The TechQA Dataset shows that general QA models barely beat an "always unanswerable" baseline on IBM Technotes. Second, override is real. ReDeEP analyses the model's internal layers and finds that in 65–77% of hallucinations the attention heads did look at the right context tokens, but later feed-forward layers "over-added" the model's prior knowledge. CLEAR finds that conflict between context and memory leaves a distinct signature in the model's hidden states. Third, application failure is real. TheoremQA reports that putting theorem definitions into the prompt gave no significant boost, so having the knowledge in context is not the same as being able to use it.
The new element is the routing step, not targeted generation itself. Failure-driven generation already works: DPE diagnoses multimodal blind spots across 12 capability dimensions, and HardGen builds a graph of API calls that fail. Both diagnose which skill is missing. Neither asks which stage of a retrieve-then-generate pipeline broke. That question only exists when retrieval is part of the system, and it changes what data should be generated.
Research Program
The system has three parts.
The first part is a diagnostic battery. It runs on validation questions that have known supporting evidence. TechQA maps each answerable question to a gold Technote span. In TheoremQA, each question is tied to one of 350 named theorems, which we treat as the gold "document." For each failed question we run three tests:
- Retrieval test. Does the gold document appear in the top-k results? If not, the failure is labeled a miss.
- Oracle test. If the gold document was retrieved, or once we insert it by hand, does the generator now answer correctly? If it does, the original failure was a miss of ranking or position.
- Closed-book comparison. If the generator still fails with the gold evidence present, we compare its answer to its own no-retrieval answer. A wrong answer that matches the closed-book answer is labeled override. A wrong answer that matches neither its prior nor the gold answer is labeled application failure.
As an optional secondary signal, we compute ReDeEP's context-copying and parametric-knowledge scores. We expect these to correlate with the override label. We report that correlation rather than relying on it, because ReDeEP was developed on LLaMA models. The automatic labels are checked against roughly 200 hand-labeled failures per domain.
The second part is three cause-specific generators. All three share one open teacher model and one verification rule.
- Misses. The teacher writes realistic, jargon-heavy paraphrases of the failed question that point to the gold document, paired with retrieved hard negatives. These train the dense retriever. This is close in spirit to RADA, which generates domain training samples from retrieved contexts. Unlike RADA, our generation is anchored to the specific documents the system missed, not to a generic pool such as NQ or MS MARCO.
- Overrides. The teacher edits the gold passage so that it contradicts the model's closed-book answer, and derives the target answer from the edited passage. This adapts the counterfactual rewriting of DACL-RAG, aimed only at facts where this particular model has shown it overrides.
- Application failures. The teacher writes worked traces that go from the passage to the answer through explicit intermediate steps. TheoremQA traces are checked by executing a program-of-thought solution against the numeric answer. TechQA traces are checked by span overlap with the gold answer.
Within each cause, we prefer near-boundary questions. These are questions the model solves about half the time under resampling, which follows DPE's finding that such questions give the most improvement per example.
The third part is the budget split and an interference check. The total budget is fixed, by default 3,000 examples to match DPE's scale. It is divided in proportion to the frequency of each cause, measured on validation. We borrow the idea of in-context interference from Targeted Data Generation. That work found that fixing one weak subgroup can quietly degrade others. We therefore track held-out domain questions and a general open-domain set, and report any drop alongside the gain.
Baselines
The naive reference point is the same 7–8B generator and the same retriever, with no fine-tuning. It is run once with retrieval and once closed-book. This gives the floor and the closed-book answers that the diagnostic battery needs.
The strongest existing number on our main benchmark sits in The TechQA Dataset:
- the TAP ranker-plus-span-selector system reaches HA_F1@5 of 57.49;
- NQ pre-training followed by fine-tuning on the 600-question TechQA training set reaches F1 of 55.31.
These are extractive systems. We report them as reference points, not as same-architecture competitors.
The strongest same-setting competitor for data augmentation is RADA. With 10 seed examples on TechQA it raised average F1 from 9.54 (seeds only) to 40.81. We rerun RADA ourselves at the same teacher, the same example budget, and the same fine-tuning steps, in both the 10-seed and full-training regimes. Beating it means a higher TechQA F1 and a lower hallucination rate at matched budget, outside seed-to-seed variance over three seeds.
The ablation that isolates our key ingredient is cause-blind failure targeting, a DPE-style arm. It generates the same number of examples from the same failed questions and the same near-boundary pool, but picks the data type uniformly at random instead of by diagnosed cause. If cause-routing does not beat this arm, the routing step contributes nothing.
We also include two single-repair arms. One spends the whole budget on retriever data. The other spends it all on counterfactual data, which approximates DACL-RAG restricted to its hard stage.
Finally, we include training-free steering using ReDeEP's AARF method. AARF boosts the attention heads that copy from the context and damps the feed-forward layers at generation time. It is applied to the untrained model, which tells us whether overrides can be fixed without any data at all.
Why not just…?
Why not just generate more data with RADA and skip diagnosis? This is the most serious threat. RADA's gain on TechQA is large and comes without any failure analysis. The cause-blind arm and the RADA rerun at matched budget answer the question directly. If either one matches cause-routing, we will report that diagnosis is unnecessary at this scale. The routing hypothesis predicts that RADA does relatively well where misses dominate and worse on TheoremQA, where the TheoremQA paper suggests application failures dominate.
Why not just improve the retriever or add a reranker? If most TechQA failures are misses, this is the right answer for TechQA, and our battery will say so. The retriever-only arm measures that case. The TheoremQA result constrains this alternative: even with the theorem in context there was no significant gain, so better retrieval alone cannot close a gap caused by inability to apply knowledge. We predict the retriever-only arm leaves application failures untouched.
Why not just steer at inference time, or use a bigger model? AARF needs no training and targets exactly the override mechanism. We expect it to fix overrides, to do nothing for misses or application failures, and possibly to hurt cases where the prior was correct. The per-cause breakdown will show whether those expectations hold. Scale is an inadequate answer. TheoremQA reports 51% for GPT-4 with program-of-thought prompting, against 60–95% for undergraduates, and Bi'an reports that larger models can suffer more from memory interference. We still report a larger open model run without augmentation as a reference.
Proposed Experiments
The domains are TechQA, which gives F1 and HA_F1@5, and TheoremQA, which gives accuracy. TheoremQA reports open models below 15% and GPT-4 at 51%. Covid QA and Policy QA from RADA serve as secondary domains. No reported result found on Lacuna for Covid QA or Policy QA scores, so our own reruns define the baselines there.
Hallucination rate is measured by a span-level detector trained in the manner of RAGTruth. There, a fine-tuned 13B detector reached 78.7% response-level F1 and 52.7% span-level F1. Because that detector was trained on news and business text, we recalibrate it on 300 hand-annotated domain responses before trusting it. We also separately report how hallucinations are distributed across the length of each answer, to see whether worked traces reduce RAGTruth's "tail effect," where errors cluster toward the end of long answers.
Faithfulness under conflict is checked on FaithEval. There CLEAR reports 74.4% F1 against 71.6% for the strongest baseline, and we use it to confirm that override data does not make the model blindly copy irrelevant context. General capability is checked on NQ.
The decisive check is a repair matrix. For each data type, we measure the reduction in failures of each cause on held-out questions. The routing hypothesis predicts a strong diagonal: retriever data fixes misses, counterfactual data fixes overrides, and worked traces fix application failures, each with little effect off the diagonal.
A flat matrix would mean any failure-adjacent data helps equally, and would refute the idea regardless of headline scores. A secondary check is whether the cause mix actually differs between TechQA and TheoremQA. If it does not, routing collapses to a fixed recipe. The override cases also allow a small side analysis of the disagreement between ReDeEP and CLEAR. If attention onto the gold passage is already high in override failures, that supports ReDeEP's account of late feed-forward suppression. If it is low, that supports CLEAR's account of attention misallocation.
References
- The TechQA Dataset
- ReDeEP: Detecting Hallucination in Retrieval-Augmented Generation via Mechanistic Interpretability
- Probing Latent Knowledge Conflict for Faithful Retrieval-Augmented Generation
- TheoremQA: A Theorem-driven Question Answering Dataset
- From Blind Spots to Gains: Diagnostic-Driven Iterative Training for Large Multimodal Models
- From Failure to Mastery: Generating Hard Samples for Tool-use Agents
- Retrieval-Augmented Data Augmentation for Low-Resource Domain Tasks
- DACL-RAG: Data Augmentation Strategy With Curriculum Learning for Retrieval-Augmented Generation
- Targeted Data Generation: Finding and Fixing Model Weaknesses
- Bi'an: A Bilingual Benchmark and Model for Hallucination Detection in Retrieval-Augmented Generation
- RAGTruth: A Hallucination Corpus for Developing Trustworthy Retrieval-Augmented Language Models