Chapter 4 · Knowledge Conflicts and Faithfulness¶
4.1 When parametric knowledge and contextual knowledge conflict, what does the model do? ★★¶
One-sentence answer
It depends on a contest between the strength of the model's prior in its own memory and the persuasiveness of the evidence in the context: large models tend to ignore clumsy evidence built by entity substitution and stick to their memory, yet readily accept coherent, convincing evidence even when it is wrong. This contest has nothing to do with whether the evidence is correct, so the ideal behavior is "conditional trust": relevant and credible context should take priority, while irrelevant or suspicious context should be ignored or flagged as contradictory.
I will address four aspects: what the two kinds of knowledge are, the early finding of "over-reliance on memory", the later finding of "over-reliance on context", and how to reconcile these two seemingly opposite conclusions.
(1) A model draws on two sources of knowledge when answering, each with its own strengths and weaknesses.
Parametric knowledge is knowledge written into the weights during pretraining, such as "Paris is the capital of France", generally thought to be stored mainly in the FFNs (see the Model Architecture direction, 1.5). It is broad and always available, but it is frozen at the training cutoff, remembers long-tail facts poorly, and cannot name a source, so it cannot be verified. Contextual knowledge is information placed in the prompt at inference time, including retrieved documents, material provided by the user, dialogue history and tool results. It can be updated at any time, can include private data and can be traced to a specific source, which is exactly why RAG exists. RAG's basic assumption is that the model should prefer the knowledge in its context, yet the two do not always agree: when a retrieved document says "the CEO of company X is A" while the model remembers B, what the model does, and what it should do, is the question here.
(2) Early studies found that models often ignore the context and stick to their own memory.
Longpre et al. (2021) were the first to study this systematically. They created conflicts by entity substitution: replacing every occurrence of the answer entity in a retrieved passage with another entity of the same type, for example replacing "Obama" with "Bush", and checking whether the model output the original answer or the substituted one. On T5 generative readers, the model frequently output the original answer from memory even after reading the substituted passage, which is itself a form of hallucination, since the output cannot be found anywhere in the given context. Moreover, larger models relied on memory more, because they remember more and more firmly; and the worse the retrieval quality during training, the more the model relied on memory, because training taught it that "passages are unreliable, better rely on myself".
(3) Later studies of instruction-tuned models reached almost the opposite conclusion: models over-rely on the context.
Xie et al. (2023) pointed out that evidence built by entity substitution often fails because it is incoherent: after a few words are swapped mechanically, the surrounding text often no longer fits, the model senses that something is off, and so it sticks to its memory. If instead an LLM generates coherent, convincing counter-memory evidence, such as a logically fluent, detailed explanation that simply reaches a different conclusion, models like ChatGPT and GPT-4 accept it very readily, even when it directly contradicts their memory. ClashEval (Wu et al. 2024) confirmed this in a setting closer to RAG: after retrieved content was perturbed with errors ranging from subtle to blatant, six leading models including GPT-4o adopted the incorrect retrieved content more than 60% of the time, overriding their own originally correct knowledge. A well-written wrong document can therefore sway the model more than a poorly written correct one.
(4) Both conclusions can be unified as a contest between "prior strength" and "evidence persuasiveness", and this contest has nothing to do with whether the evidence is correct.
Prior strength is how confident the model is in its memory, shaped by entity popularity, model size and how often the fact appeared in training; evidence persuasiveness depends on whether the evidence is coherent, whether several pieces corroborate each other, and how far it deviates from memory. ClashEval's two findings correspond exactly to the two ends: the less confident the model is in its initial answer (the lower its token probability), the more likely it is to adopt the retrieved content; the more outlandish the retrieved content, the less likely it is to be adopted. On this view, Longpre's evidence was incoherent and weakly persuasive while large models have strong priors, so they appeared to rely on memory; Xie's evidence was coherent and highly persuasive, so models appeared to rely on context. The problem is that the model compares "how sure am I" with "how true does this text sound", not "which source is more credible". Li et al. (2022) accordingly summarize the ideal behavior as two requirements: controllability, meaning that when the context is relevant and conflicts with memory, the context should take priority, so that the answer can be corrected simply by changing the input; and robustness, meaning that when the context is irrelevant to the task, it should be ignored. The two are in tension, so the ideal is conditional trust: deciding how much to trust based on whether the context is relevant, whether it is credible and how strongly it conflicts with memory, and saying so or abstaining when the evidence is insufficient or the conflict cannot be resolved (see 4.5).
In summary: a model's choice in a conflict is decided by a contest between prior strength and evidence persuasiveness, not by whether the evidence is true, so a RAG system needs extra mechanisms such as source credibility, contradiction detection and abstention to achieve "conditional trust".
Comparing the two sources of knowledge:
| Parametric knowledge | Contextual knowledge | |
|---|---|---|
| Where it lives | In the model weights, learned during pretraining and finetuning | In the prompt: retrieved documents, user input, dialogue history, tool outputs |
| How to update it | Retrain, finetune or edit the weights (slow, expensive) | Change the input (instant, cheap) |
| Coverage | Broad but frozen at the training cutoff; weak on long-tail facts | Only what is retrieved or provided; can be fresh and private |
| Verifiable? | No explicit source | Can be traced back to a specific document |
| Typical failure | Hallucination, outdated facts | Retrieval noise, misinformation, missing information |
Going deeper: the memorization ratio, factors that shape the model's choice, and ClashEval's findings
(1) The memorization ratio of Longpre et al. (2021).
Here \(p_o\) is the fraction of outputs that give the original answer (the one in memory), and \(p_s\) is the fraction that give the substituted answer (the one in the context). The higher the MR, the more the model ignores the context. Their three findings on T5 were: on NewsQA, the rate of ignoring the context reached up to 75%; from T5-small to T5-XXL, the MR on the training set and the in-distribution dev set rose from under 15% to at least 50%, with no sign of leveling off; and when the passages given during training often lacked the answer, the model also tended to ignore passages at inference. Their mitigation was simple: add entity-substituted examples to the training data, labeled with the answer in the context. This brought the MR down to nearly 0 and also raised out-of-distribution accuracy by 4–7 points. This kind of counterfactual data augmentation later became one of the standard ways to improve context faithfulness (see 4.7).
(2) Four factors identified by Xie et al. (2023).
- Confirmation bias: when evidence both for and against its memory is given together, the model strongly favors the piece that agrees with its memory, most clearly so for GPT-4. That is, given only counter-memory evidence the model is easily persuaded, but as soon as one piece agrees with its memory, it holds on to that piece.
- Popularity: the more popular the entity, the more the model sticks to its memory. On the most popular questions, GPT-4 stuck to its memory about 80% of the time, because popular facts appear often in pretraining and the model's "belief" is stronger. This echoes the finding of Mallen et al. (2022) that for popular facts retrieval brings more risk than benefit (see Chapter 3).
- Quantity: the model tends to side with whichever answer has more supporting documents, roughly "majority rules". The same piece of misinformation copied by several websites can therefore outweigh one authoritative source.
- Order: apart from GPT-4, which is relatively stable, models are sensitive to the order of the evidence; some favor what appears first, others what appears later. Order should not affect factual judgment, which shows the model is not really weighing the evidence (this relates to the lost-in-the-middle effect in long contexts; see the Model Architecture direction, 3.6).
(3) Two quantitative findings from ClashEval (Wu et al. 2024).
- The less confident the model, the more easily retrieved content changes its answer: the lower the token probability of the model's initial answer, the higher the rate at which it adopts the retrieved content.
- The more outlandish the perturbation, the less likely it is adopted: the further the retrieved content deviates from the true value, the more the model sticks to its own answer.
These correspond to "prior strength" and "how far the evidence deviates from memory", the two ends of the unified framework.
Follow-up questions
Follow-up 1: Early studies said models over-rely on memory, later ones said they over-rely on context. How do you reconcile these?
The two lines of work tested evidence of different strength on different models. The early studies built evidence by entity substitution, which is incoherent and weakly persuasive, and tested large T5 models with strong priors, so the models appeared to rely on memory; the later studies used LLMs to generate coherent counter-memory evidence and tested instruction-tuned models, so the models appeared to rely on context. Placed within the framework of "prior strength versus evidence persuasiveness", the two findings do not contradict each other.
Follow-up 2: How do you build test data for knowledge conflicts, and what are the problems with entity substitution versus LLM-generated evidence?
Entity substitution is simple and controllable but unnatural; LLM-generated evidence is natural but may understate the model's robustness. Entity substitution swaps only the answer entity, so it is cheap and its labels are clean, but the substituted text is often self-contradictory and the model can detect the anomaly, which overstates how much the model sticks to its memory. LLM-generated counter-memory evidence is coherent and detailed, closer to a real wrong web page, but it may be more persuasive than most real noise, and the generation process can introduce other errors. In practice the two are often combined, together with manual spot checks.
Follow-up 3: What is confirmation bias, and how does it affect RAG?
Confirmation bias is the model's preference, among several pieces of evidence, for the one that agrees with its memory. In RAG, this means that as long as one retrieved document supports the model's old knowledge, the model may ignore other, newer and more authoritative documents. When knowledge has been updated but old documents remain in the corpus, the model is therefore likely to keep giving the outdated answer.
Follow-up 4: Why is a piece of misinformation more dangerous once it has been copied by several websites?
Because the model tends to side with whichever answer has more supporting documents. Copying makes the same misinformation appear several times in the retrieval results, and the model treats "appears more often" as "more credible", outweighing an authoritative source that appears only once. Remedies are to deduplicate retrieval results, count votes by source rather than by document, and add information about each source's authority.
Follow-up 5: What are controllability and robustness, and why are they in tension?
Controllability asks the model to listen to the context; robustness asks it not to listen to everything. A model that always trusts the context scores perfectly on controllability, but a single wrong document can lead it astray; a model that always trusts its memory is robust but cannot be corrected with new information. Neither can be pushed to the extreme on its own; they must be balanced according to the relevance and credibility of the context.
Common mistakes
- Do not say that models always trust the context, or always trust their memory: The outcome depends on the persuasiveness of the evidence, the size of the model and the popularity of the knowledge.
- Do not say that larger models make better use of the context: In conflicts, larger models have stronger priors and are actually more likely to stick to their memory.
- Do not equate the persuasiveness of evidence with its correctness: The fact that coherent wrong evidence persuades the model shows precisely that the model is not comparing source credibility.
- Do not say that "always follow the context" is the ideal behavior: That satisfies only controllability and sacrifices robustness.
4.2 What types of knowledge conflict are there? ★¶
One-sentence answer
Following the survey by Xu et al. (2024), knowledge conflicts fall into three types: conflicts between the context and memory, conflicts among contexts, and conflicts within the model's memory. Context–memory conflict is the most central type in RAG; it can arise from changes in the world (where the context should be trusted) or from misinformation (where memory should be trusted or the contradiction pointed out), and on the surface the model can hardly tell these two cases apart.
I will address three aspects: what the three types are, why context–memory conflict is the hardest to handle, and the directions for addressing each type.
(1) Knowledge conflicts fall into three types, which differ in which two parties disagree.
- Context–memory conflict: the context contradicts the model's parametric knowledge, for example a retrieved document says the CEO is A while the model remembers B. The main causes are outdated training data (temporal misalignment) and misinformation in the context.
- Inter-context conflict: retrieved documents contradict each other, for example one says the product launched in March and another says May. The cause may be misinformation (including content generated by LLMs that has spread online), or documents written at different times, each correct when written.
- Intra-memory conflict: the model's own knowledge is inconsistent, so asking the same question a different way yields a different answer. Causes include contradictory or wrong content already present in the pretraining corpus, randomness from sampling-based decoding, and knowledge edits that change only some phrasings without generalizing consistently.
(2) Context–memory conflict is the most central, because its two sources call for opposite responses, and the model can hardly tell them apart.
Temporal misalignment means that the model's knowledge stops at its training cutoff while the world keeps changing, so information in new documents naturally conflicts with old memories. This kind of conflict is exactly the problem RAG is meant to solve, and the model should trust the context. However, if the conflict comes from misinformation pollution, meaning the retrieved documents or user input are themselves wrong, or even deliberately planted, the model should stick to its memory, or at least point out the contradiction. On the surface both cases look like "the document says something different from what I remember", so the text alone gives little basis for deciding whom to trust, and extra information such as the source and date is needed. Intra-memory conflict is less directly tied to RAG, but it shows that the model's parametric knowledge is not a stable, consistent "database" in the first place, which is one reason why one cannot simply "trust memory in a conflict".
(3) Different types of conflict call for different directions.
- Context–memory conflict: if the goal is to be faithful to the context, one can use finetuning, prompting, context-aware decoding and similar methods (see 4.7); if the context might be wrong, one needs to discriminate misinformation, for example by training a discriminator or augmenting the query; one can also disentangle the sources, having the model give both "the answer according to the documents" and "the answer from memory", and leave the judgment to the user or a downstream step.
- Inter-context conflict: the main directions are detecting contradictions (with dedicated contradiction-detection models or external tools) and improving robustness (training the model to pick out the reliable parts among contradictory documents).
- Intra-memory conflict: the main directions are improving consistency (for example, finetuning with a consistency loss, or ensembling several outputs) and improving factuality (for example DoLa, a decoding method that contrasts outputs from different layers, or intervening on internal representations at inference time).
In summary: the three types differ in which two parties disagree; the most important for RAG is context–memory conflict, because the same surface phenomenon may call for opposite responses.
Comparing the three types of knowledge conflict:
| Type | Definition | Example | Main causes |
|---|---|---|---|
| Context–memory | Contextual knowledge contradicts parametric knowledge | Retrieved text says the CEO is A; the model remembers B | Temporal misalignment (outdated training data); misinformation in the context |
| Inter-context | Pieces of contextual knowledge contradict each other | Two retrieved documents give different release dates | Misinformation (including LLM-generated); outdated documents with different timestamps |
| Intra-memory | The model's own knowledge is inconsistent | Paraphrased versions of the same question get different answers | Noisy or biased pretraining data; sampling-based decoding; knowledge edits that don't generalize |
Going deeper: how to handle each type of conflict
(1) How to handle a context–memory conflict depends on where it comes from.
| Source of the conflict | Desired behavior | Signals one can use |
|---|---|---|
| Temporal misalignment (the world changed) | Follow the context | The document was published after the model's training cutoff; the question is time-sensitive |
| Misinformation pollution | Stick to memory, or point out the contradiction | Low source authority; a single source only; contradicts several reliable sources |
| Cannot be decided | State that there is disagreement, or abstain | Neither the evidence nor the memory carries high confidence |
(2) Inter-context conflicts cannot be resolved by "taking the majority" or "taking the top-ranked document".
Majority voting can be outweighed by copied misinformation (see the quantity effect in 4.1), and choosing by position is subject to order bias. A more reasonable approach is to detect the contradiction first, then compare the credibility and publication dates of the sources; if it still cannot be decided, present the different claims to the user together with their sources.
(3) Intra-memory conflicts can be exposed with consistency checks.
Ask the same question in several phrasings, or sample several times, and check whether the answers agree. Disagreement is itself a signal that the model is unsure of this piece of knowledge, in which case it should retrieve, or lower the confidence of its answer.
Follow-up questions
Follow-up 1: In a context–memory conflict, when should the model trust the context and when its memory?
Trust the context when it is newer and credible; stick to memory or point out the contradiction when the context is suspicious. If the conflict comes from a change in the world, such as a change of personnel or a new release, the context is newer and should take priority; if the context comes from an unreliable source, has only a single source, or contradicts common knowledge or several reliable sources, the model should stick to its memory, or tell the user about the contradiction. In settings where the context is reliable, such as an enterprise knowledge base, the context usually takes priority by default.
Follow-up 2: When several retrieved documents contradict each other, how should the system handle it?
Detect the contradiction, compare sources and dates, and list the disagreement when it cannot be decided. The system should not simply take the first document or the majority, but compare the authority and publication date of each source; if both are credible but from different times, the newer one usually takes priority and the change is noted; if it still cannot be decided, the different claims and their sources are presented to the user together.
Follow-up 3: How does intra-memory conflict relate to RAG?
It shows that parametric knowledge is itself unreliable, so memory cannot be trusted unconditionally in a conflict. If the model gives different answers to different phrasings of the same fact, then the "memory" it holds on to in a conflict with the context may itself be random. Inconsistency within memory can also serve as a signal that retrieval is needed (see Chapter 3).
Common mistakes
- Do not say that every knowledge conflict is bad: Conflicts caused by temporal misalignment are exactly what RAG is meant to solve, and the model should trust the context.
- Do not resolve inter-context conflicts by majority vote: The same piece of misinformation may be copied by several websites.
- Do not assume that the model's parametric knowledge is consistent: Rephrasing the same question can yield a different answer.
4.3 What is the difference between faithfulness and factuality? ★★¶
One-sentence answer
Faithfulness asks whether the answer is supported by the given context, while factuality asks whether it matches the facts of the real world; the two diverge in two cases: the context itself is wrong and the model repeats it (faithful but not factual), and the model adds true information from memory that the context does not contain (factual but not faithful). Most RAG settings should optimize faithfulness first, because it can be verified and audited, while still spotting obvious errors in the evidence.
I will address three aspects: the definitions of the two concepts, when they diverge, and which one RAG should prioritize.
(1) Faithfulness is measured against the given context; factuality is measured against the real world.
A common way to measure them is to split the answer into atomic claims and check each one for entailment: faithfulness checks whether the context entails the claim, while factuality checks whether world knowledge (such as Wikipedia or a reliable knowledge base) entails it (the formulas are in "Going deeper" below). This distinction was first discussed systematically in summarization. Maynez et al. (2020) divided hallucinations in summaries into two kinds: intrinsic hallucination distorts information in the source, such as getting a name or number from the source wrong; extrinsic hallucination adds information that is not in the source. An extrinsic hallucination is not necessarily wrong: the model may add a true background fact from memory, which is factual but not faithful. They also found that metrics based on textual entailment (NLI) reflect faithfulness better than overlap metrics such as ROUGE, which is why most automatic faithfulness evaluation today, including the RAG metrics in Chapter 6, is based on NLI or LLM judgments.
(2) There are two main ways the two can disagree.
- Faithful but not factual: the context itself is wrong, such as an outdated web page or misinformation, and the model repeats it. By faithfulness it did well; by factuality it is wrong.
- Factual but not faithful: the context does not contain the information, and the model adds a sentence from memory that happens to be correct. By factuality there is no problem, but the user cannot verify it through the cited documents, and the same behavior becomes a hallucination whenever the model misremembers.
(3) Most RAG settings should optimize faithfulness first, but faithfulness alone is not enough.
A faithful answer can be verified: every sentence traces back to some document, and when something goes wrong, one can tell whether retrieval or generation was at fault. Users often choose RAG precisely because they want answers with sources, and this is even more true for enterprise knowledge bases, law and medicine, where the answer must be based on the given documents even if the model "thinks" it knows more. However, if the context itself is wrong, faithfully repeating the error is just as harmful. An ideal system therefore stays faithful to the evidence while also spotting obvious errors in it, and alerts the user when the evidence conflicts with common knowledge, which brings us back to the "conditional trust" of 5.1.
In summary: faithfulness measures "is it supported", factuality measures "is it true"; RAG makes faithfulness its primary goal because it is verifiable and auditable, but it must still stay alert to errors in the evidence itself.
The four combinations of the two:
| Factual | Not factual | |
|---|---|---|
| Faithful | Ideal: grounded and true | Context is wrong or outdated, and the model faithfully repeats it |
| Not faithful | Model adds a true fact from memory that the context doesn't contain | Hallucination: neither in the context nor true |
Going deeper: formal definitions of the two metrics
Here \(y\) is the answer, \(A(y)\) is the set of atomic claims it is split into, \(a\) is one of those claims, \(c\) is the given context, \(\mathcal{K}\) is world knowledge (such as Wikipedia or a reliable knowledge base), \(\models\) means "entails", and \(\mathbb{1}[\cdot]\) is the indicator function, equal to 1 when the condition holds and 0 otherwise. The two metrics are computed in exactly the same way and differ only in the reference: faithfulness uses \(c\), factuality uses \(\mathcal{K}\).
In practice, "does it entail" is usually judged by an NLI model or an LLM. RAGAS faithfulness is one implementation of \(\mathrm{Faith}\) (see 6.2); evaluating factuality requires a knowledge source independent of the context, so it is usually more expensive and harder to do (hallucination in general is discussed in the Inference, Evaluation and Deployment direction, 5.6).
Follow-up questions
Follow-up 1: Give an example of an answer that is faithful but not factual, and one that is factual but not faithful.
The former repeats a wrong document; the latter adds a correct sentence from memory. For example, if the knowledge base contains an outdated document saying "the company's CEO is A" while the CEO has since changed to B, and the model answers "the CEO is A", the answer is faithful but not factual. Or, if a document describes only a drug's indications and the model adds "the drug was approved in 2019", which happens to be true but is not in the document, the answer is factual but not faithful.
Follow-up 2: What are intrinsic and extrinsic hallucinations, and is an extrinsic hallucination always wrong?
An intrinsic hallucination distorts the source, an extrinsic one adds content not in the source; an extrinsic hallucination is not necessarily wrong. An intrinsic hallucination is always unfaithful and usually also not factual; an extrinsic hallucination may happen to be a true background fact, in which case it is factual but not faithful. In RAG, even an extrinsic hallucination that happens to be correct is a risk, because the user cannot verify it through the citations.
Follow-up 3: How can faithfulness be evaluated automatically?
Split the answer into atomic claims, then use an NLI model or an LLM to judge, claim by claim, whether the context entails each one. After splitting, each judgment is simple, and the share of supported claims is computed at the end. Overlap metrics such as ROUGE are ill-suited to faithfulness, because a faithful paraphrase may have little overlap while a wrong sentence that changes only one number has high overlap. The specific metrics and the pitfalls of judges are covered in Chapter 6.
Follow-up 4: Should a RAG system prioritize faithfulness or factuality, and why?
In most settings, faithfulness first. A faithful answer can be verified and audited, and when it goes wrong one can locate whether retrieval or generation is at fault; moreover, in enterprise, legal and medical settings the answer must be based on the given documents anyway. But the system should also spot obvious errors in the evidence and alert the user when the evidence conflicts with common knowledge, rather than repeating it blindly.
Common mistakes
- Do not use faithfulness and factuality interchangeably: The former is measured against the context, the latter against the real world.
- Do not say that an extrinsic hallucination is always wrong: It may be true information the model added from memory, just without support.
- Do not say that a faithful answer is enough: If the context itself is wrong, faithfully repeating it is just as harmful.
- Do not use overlap metrics such as ROUGE to measure faithfulness: Metrics based on NLI or LLM judgments agree better with human judgment.
4.4 How should RAG handle noisy or misleading retrieval results? ★★¶
One-sentence answer
The most dangerous retrieval noise is not completely irrelevant documents but documents that look relevant yet lack the answer or contain a wrong one, because the model tries hard to "find" an answer in them. Remedies fall into three groups by where they act: filter before generation with a reranker, an NLI model or an evaluator; mix distractor documents into training so the model learns to ignore noise; and have the model assess the evidence document by document before answering.
I will address three aspects: what kinds of noise there are, what empirical studies have found, and the methods for improving robustness.
(1) Retrieval noise can be ordered from least to most harmful, and the most dangerous documents are those that look relevant.
The top-k returned by a retriever cannot all be useful. Completely irrelevant documents are the easiest for the model to ignore and do the least damage; distracting documents that are on topic but lack the answer (for example, a passage about a similar entity) do more harm, because they look relevant and the model tries to extract an answer from them; counterfactual documents that fluently state a wrong answer can make the model overturn correct memory (see 4.1); contradictory documents can make the model answer by order or majority rather than credibility; and the most serious are adversarial documents deliberately crafted and planted in the corpus (knowledge poisoning, a security topic not expanded here).
(2) Empirical studies characterize the impact of noise from several angles.
- Related but unhelpful documents hurt more than random ones: Cuconasu et al. (2024) found that highly ranked documents that are on topic but lack the answer clearly lower accuracy; counter-intuitively, adding completely random documents to the prompt can actually raise accuracy. This shows that "relevant according to the retriever" and "useful for generation" are different things, and that optimizing only the retriever's relevance metrics is not enough.
- In multi-hop reasoning, irrelevant documents cause cascading errors: Yoran et al. (2023) analyzed when retrieval actually lowers accuracy on five open-domain QA benchmarks and pointed out that the problem is especially serious in multi-hop reasoning: once one step misuses irrelevant evidence, every later step builds on that error, which compounds.
- The more irrelevant documents, the worse the filtering: Xie et al. (2023) found that when relevant evidence is present, models can partly ignore irrelevant passages, but this ability weakens as more irrelevant passages are added, and smaller models are hit harder.
- The abilities RAG needs are all still lacking: the RGB benchmark (Chen et al. 2023) splits the abilities RAG needs into noise robustness, negative rejection, information integration and counterfactual robustness, and found that models have some noise robustness but fall clearly short on rejection, integration and spotting misinformation.
(3) Methods for improving robustness fall into three groups by where they act.
- Filter before generation: use a reranker or an NLI model to screen out irrelevant documents, or, as in CRAG, use an evaluator to judge retrieval quality and refine documents (see Chapter 3). The fundamental trade-off of filtering is that the harder you filter, the less noise, but the lower the recall, and useful passages get removed by mistake.
- Train the model to ignore noise: deliberately mix irrelevant and distracting documents into the training data so the model learns to find useful information amid noise. Yoran et al. (2023) found that only about 1,000 training examples mixing relevant and irrelevant contexts were enough to make the model robust to irrelevant context while still performing well when the context is relevant (RAFT and related methods are in 6.6).
- Have the model assess the evidence before answering: in the prompt or in training, ask the model to first judge, document by document, whether each one is relevant and credible, and then answer based on those judgments; for example, Chain-of-Note (Yu et al. 2023) has the model write a reading note for each document first. One can also add source metadata (website, publication date) to the prompt so the model can compare credibility and recency. The cost is longer outputs and more latency.
In summary: the harm of retrieval noise grows with how relevant it looks; remedies sit at three places, before generation, during training and during generation, and in practice they are usually combined.
Kinds of retrieval noise:
| Noise type | What it looks like | Why it is harmful |
|---|---|---|
| Irrelevant | Off-topic passages with no connection to the question | Wastes context; can distract weaker models |
| Distracting (related but unhelpful) | On-topic passages that don't contain the answer, e.g. about a similar entity | Looks relevant, so the model is tempted to extract an answer from it |
| Counterfactual / misinformation | Passages that state a wrong answer fluently | The model may adopt it over correct memory (see 4.1) |
| Conflicting | Several passages that disagree with each other | The model may follow order or majority rather than credibility |
| Adversarial | Passages deliberately crafted or planted to steer the answer | Targeted attacks on the retrieval corpus (knowledge poisoning) |
Going deeper: the four abilities in RGB and the trade-off of filtering
(1) The four abilities tested by RGB (Chen et al. 2023).
| Ability | Meaning | How it is tested |
|---|---|---|
| Noise robustness | Extract the right information from noisy documents | Mix different proportions of noisy documents into the relevant ones |
| Negative rejection | Refuse to answer when no document contains the answer | Provide only noisy documents |
| Information integration | Combine several documents to answer | The answer is spread across several documents |
| Counterfactual robustness | Spot errors in the documents | Documents contain wrong facts, with a hint that errors may be present |
(2) A concrete example of the filtering trade-off.
Yoran et al. (2023) tried a simple NLI filter that keeps only passages entailing the question–answer pair. It does prevent the performance drop caused by retrieval, but it also wrongly removes some useful passages, because many useful passages provide only partial clues and do not entail the complete answer on their own. This shows that the filter's threshold must balance noise against recall, especially for multi-hop questions.
(3) Two ways to assess the evidence before answering.
- Write a reading note per document: Chain-of-Note has the model first write down how each document relates to the question (answers it directly, provides a clue, or is irrelevant), then answer from the notes; when all documents are irrelevant, the model can use this to answer "I don't know".
- Provide source metadata: mark each document with its website and publication date, so the model can compare the authority and recency of sources in a conflict.
Follow-up questions
Follow-up 1: Why are on-topic documents that don't contain the answer more harmful than completely random ones?
Because the model treats them as evidence and tries hard to extract an answer from them. A random document has nothing to do with the question, so the model easily recognizes and ignores it; a related document without the answer is lexically very similar to the question, so the model assumes the answer is in it and "patches together" an answer from a similar entity or nearby information. This also shows that high relevance metrics for the retriever do not mean the retrieval results are useful for generation.
Follow-up 2: What is the cost of filtering documents before generation?
The harder you filter, the lower the recall. The filter itself makes mistakes, and in particular removes passages that provide only partial clues without containing the answer on their own, which are exactly what multi-hop questions depend on. Filtering also adds extra model calls and latency. Its threshold must therefore be tuned to the task rather than chasing a perfectly clean context.
Follow-up 3: Why is multi-hop reasoning especially sensitive to retrieval noise?
Because errors propagate and compound along the reasoning chain. In a multi-hop question, each step's retrieval and reasoning depend on the previous step's conclusion; if one step misuses irrelevant evidence, for example by identifying the wrong bridge entity, every later step revolves around that error, ending in an answer that looks well argued but is wrong (see 5.5).
Common mistakes
- Do not say that completely irrelevant documents are the most harmful: The most dangerous are documents that look relevant yet lack the answer or contain a wrong one.
- Do not say that harder filtering is always better: Filtering lowers recall and removes useful passages.
- Do not optimize only the retriever's relevance metrics: "Relevant according to the retriever" and "useful for generation" are different things.
4.5 When should a RAG system abstain? ★¶
One-sentence answer
There are three main cases: neither the context nor the model's memory has the answer, the context is related to the question but lacks a key piece of information, and a conflict among documents cannot be resolved. The abstention decision depends on a well-calibrated confidence, and in RAG the model's own confidence is not enough; it must be combined with retrieval-side signals such as "is the context sufficient". Abstaining too little produces hallucinations, while abstaining too much makes the system useless.
I will address three aspects: which situations call for abstention, what the research on "sufficient context" found, and why abstention depends on calibration.
(1) There are three main situations in RAG where the model should abstain.
- Neither the context nor memory has the answer: retrieval found nothing and the model does not know either, so any answer would be made up.
- The context is insufficient: the retrieved documents are related to the question but lack a key piece of information, for example the question asks for 2024 data and the documents only have 2023 data. The model can easily "patch together" an answer from nearby information, which is exactly the "negative rejection" ability tested in RGB (see 4.4).
- The conflict cannot be resolved: several documents contradict each other with no good clues as to which is credible. Here it is better to say that there is disagreement and list the different claims than to pick one at random.
(2) Strong models often fail to abstain when the context is insufficient, yet "always abstain when it is insufficient" is not optimal either.
Joren et al. (2024) make the situation above clearer with the notion of sufficient context: whether the retrieved context contains enough information to answer the question. They found that strong models such as Gemini 1.5 Pro, GPT-4o and Claude 3.5 answer well when the context is sufficient, but when it is insufficient they often give a wrong answer instead of abstaining; smaller models often hallucinate or abstain even when the context is sufficient. Another finding is that insufficient context can still sometimes help the model answer correctly, because it may provide partial clues that trigger the model's memory. "Always abstain when the context is insufficient" would therefore give up some questions that could have been answered correctly.
(3) The abstention decision relies on a well-calibrated confidence, and in RAG it must be combined with retrieval-side signals.
Calibration is whether confidence matches actual accuracy: among all answers given with 80% confidence, are about 80% actually right? (The definition and measures are in the Inference, Evaluation and Deployment direction, 5.7.) If confidence does not match accuracy, for example if the model is equally confident about wrong and right answers, then wherever the threshold is placed, it will block good answers and let bad ones through at the same time. In RAG, calibration has one more complication: how sure the model should be depends not only on whether it remembers but also on the context. Given a convincing but wrong document, the model may change its answer and state it just as firmly (see 4.1); given a related document that lacks a key piece of information, strong models still tend to answer. RAG therefore needs to combine the model's own confidence with a separate judgment of whether the context is sufficient and credible. The same logic applies to the decision "should I retrieve at all", which essentially asks the model to judge "do I already know this" and likewise depends on calibration (see Chapter 3).
In summary: abstention is a trade-off between hallucination and over-refusal; it needs a well-calibrated confidence to support it, and in RAG that confidence must take into account both the model itself and the retrieved context.
Going deeper: selective prediction and evaluating abstention policies
(1) Selective prediction formalizes abstention.
Here \(x\) is the input, \(\hat{y}\) is the model's answer, \(\mathrm{conf}(x)\) is the confidence and \(\tau\) is the threshold. Coverage is the fraction of questions the model is willing to answer, and risk is the fraction of answered questions that are wrong. Raising \(\tau\) lowers both coverage and risk; lowering it does the opposite.
(2) Evaluating an abstention policy means looking at the whole curve, not a single point.
Connecting the (coverage, risk) pairs across all thresholds gives the risk–coverage curve, and lower is better; one can also, as in R-Tuning (see 4.7), rank all answers by confidence and compute average precision (AP). The specific threshold depends on the application: in medicine and law wrong answers are costly, so one should choose low risk and low coverage, while a chitchat assistant can tolerate more risk.
(3) Sources of confidence in RAG.
| Source | Examples | Limitations |
|---|---|---|
| The model itself | Token probability, verbalized confidence, consistency across samples | Swayed by the persuasiveness of the context; often overconfident after RLHF |
| The retrieval side | A judgment of whether the context is sufficient; how high the retrieval scores are | Needs an extra judging model; retrieval scores do not map neatly onto answer correctness |
Joren et al. (2024) combined a judgment of "is the context sufficient" with model confidence to decide whether to abstain, raising the share of correct answers among the responses the model gave by 2–10%.
Follow-up questions
Follow-up 1: What is "sufficient context", and what do models usually do when the context is insufficient?
Sufficient context means that the retrieved context contains enough information to answer the question. When the context is insufficient, strong models often do not abstain but give a wrong answer built from nearby information; smaller models are more prone to hallucinate or abstain whether or not the context is sufficient.
Follow-up 2: Why does abstention depend on calibration?
Because abstention means thresholding the confidence, and a threshold is meaningful only if the confidence can be trusted. If the model is equally confident about wrong and right answers, then wherever the threshold is placed it will block good answers and let bad ones through at the same time. Only when confidence matches actual accuracy does raising the threshold truly lower the risk.
Follow-up 3: Why isn't the model's own confidence enough to decide abstention in RAG?
Because the model's confidence is swayed by the context. A convincing wrong document can make the model confidently give a wrong answer, and a related but insufficient document can make strong models answer anyway. An independent signal is therefore needed to judge whether the context itself is sufficient and credible, which is then combined with the model's confidence.
Follow-up 4: What goes wrong if a model abstains too often, and how do you strike a balance?
Abstaining too often makes the system useless (over-refusal). Many user questions could have been answered correctly, and refusing them badly hurts the experience. To strike a balance, plot the risk–coverage curve and choose the threshold according to how much the application tolerates wrong answers versus refusals; during training, include both "should abstain" and "must answer" examples so the model does not slide to either extreme (see 4.7).
Common mistakes
- Do not say that the model should always abstain when the context is insufficient: Insufficient context can still provide clues that help the model answer correctly.
- Do not say that more abstention is always safer: Over-refusal makes the system useless.
- Do not decide abstention from the model's own confidence alone: It is swayed by the persuasiveness of the context, so retrieval-side signals are also needed.
4.6 How do you get RAG to produce reliable citations? ★★¶
One-sentence answer
Citation (attribution) maps each claim in the answer to a source that supports it, and there are three ways to generate it: asking the model in the prompt to tag source numbers while generating, post-hoc attribution that finds evidence for each claim after generation, and finetuning or preference optimization that trains the model to cite correctly and to abstain. Evaluation most often uses ALCE's citation recall and precision: the former checks whether each claim is fully supported by its citations, the latter whether each citation is necessary; real systems still fall short on both.
I will address three aspects: why attribution is needed, the three ways to generate citations, and how to evaluate citation quality.
(1) Attribution makes answers verifiable and auditable, and by itself constrains generation.
Attribution means mapping each claim in an answer to a source that supports it; in RAG the most common form is adding citation markers like [1] and [2] after sentences. It serves three purposes: users can open the source and check instead of trusting the model blindly; when something is wrong, one can tell whether the source itself was wrong or the model distorted it; and requiring a source for every sentence by itself makes the model fabricate less. AIS (Attributable to Identified Sources), proposed by Rashkin et al. (2021), gives attribution a clear definition: a claim \(s\) is attributable to a source \(P\) if a generic reader, after reading \(P\), would agree that "according to \(P\), \(s\) holds". Note that attribution and correctness are different things: a sentence can be fully supported by its source while the source itself is wrong, so attribution measures faithfulness, not factuality (see 4.3).
(2) There are three ways to generate citations.
- In-context citation: number the retrieved passages, put them in the prompt, and ask the model to tag each sentence with its source number while answering; the ALCE benchmark (Gao et al. 2023) evaluates models in this setting. It is the simplest and needs no training, but the model may cite the wrong number or add a "decorative" citation that looks sourced while the document does not actually support the sentence.
- Post-hoc attribution: generate the answer normally first, then find evidence for each claim. For example, RARR (Gao et al. 2022) first generates a set of verification questions about the answer, uses search to find evidence, checks whether the evidence agrees with the answer, revises the answer where it does not, and finally attaches an attribution report. It works with any generator and can fix unsupported content along the way; its downsides are the extra retrieval and call costs, and the fact that the answer was not generated from the cited evidence; the citations are added after the fact.
- Training the model to cite: use finetuning or preference optimization to teach the model to cite correctly and to abstain when there is no support. Self-RAG's IsSup token is one approach (see Chapter 3); Trust-Align (Song et al. 2024) builds about 19K preference pairs with various "bad answers" as negatives and trains with DPO, improving both refusals and citation quality.
(3) Citation quality is evaluated with citation recall and precision, and real systems do not do well.
ALCE uses an NLI model to judge entailment automatically. Citation recall measures "does everything that needs a source have enough source": a claim scores if and only if it has at least one citation and the cited passages together entail it; low recall means many claims are unsupported. Citation precision measures "is every citation useful": a citation that does not entail the claim on its own, while the remaining citations still entail the claim without it, is judged redundant; low precision means the model is piling on citations. The two involve the same trade-off as recall and precision in retrieval: citing every document for every sentence gives very high recall and very low precision. Real systems still fall well short on both: Liu et al. (2023) audited generative search engines such as Bing Chat and Perplexity and found that only about 51.5% of sentences were fully supported by their citations, and only about 74.5% of citations actually supported the sentence they were attached to, while the answers read fluently and seemed informative, which easily gives users false trust.
In summary: reliable citations require actually grounding generation in the evidence, and checking with both recall and precision whether every sentence is supported and every citation is necessary; but high citation quality does not mean the answer is correct.
Comparing the three ways to generate citations:
| Approach | How it works | Pros | Cons |
|---|---|---|---|
| In-context citation | Number the retrieved passages and instruct the model to cite them inline while answering | Simple; no training; citations come from the actual generation process | Citations may be wrong or decorative; depends on instruction following |
| Post-hoc attribution | Generate first, then search for evidence for each claim and attach or revise | Works with any generator; can also fix unsupported claims | Extra retrieval and LLM calls; the answer wasn't actually generated from the cited evidence |
| Training for citation | Finetune or preference-optimize the model to cite correctly and to refuse when unsupported | Best citation quality; learns to cite and abstain together | Needs labeled or constructed data and training |
Going deeper: ALCE's citation metrics and their limitations
(1) Definitions of citation recall and precision.
Here \(S\) is the set of all claims in the answer, \(C_s\) is the set of passages cited by claim \(s\), \(\bigoplus\) means concatenating those passages, \(\mathrm{rec}(s)\) is the recall score of a single claim, and \(\mathrm{NLI}(\cdot, s)\) is the NLI model's judgment of whether the first argument entails \(s\). The NLI model used by ALCE is TRUE, a T5-11B finetuned on NLI data. The \(\mathrm{rec}(s) = 1\) in the precision formula means that a claim's citations can score only if the claim itself is fully supported by its citations, because if the citations together cannot support the claim, it does not matter how "relevant" a single one is.
(2) Performance in practice.
Besides the audit of generative search engines by Liu et al. (2023), ALCE's experiments also found that on ELI5, even the best-performing models lacked full citation support in about half of their answers, and that closed-book generation with post-hoc citations gives good answer correctness but poor citation quality.
(3) Limitations of this automatic evaluation.
- The NLI judge itself makes mistakes: It is especially unreliable on claims that need multi-step reasoning or arithmetic to derive.
- It gives only binary judgments: Partial support earns nothing; for example, if the citations support only the first half of a claim, that claim's recall is 0.
- High citation quality does not mean the answer is correct: It measures only faithfulness and should be read together with correctness metrics.
(4) The negatives in Trust-Align.
Trust-Align's negatives cover five kinds of "bad answers": wrong answers, answering an unanswerable question, refusing an answerable one, citing unnecessary documents, and citing documents that do not support the claim. After DPO training, it improves both refusals and citation quality on ASQA, QAMPARI and ELI5. The key is that the negatives include both "failing to refuse when it should" and "refusing when it should not", otherwise the model easily slides to one extreme.
Follow-up questions
Follow-up 1: What are the pros and cons of in-context citation versus post-hoc attribution?
In-context citation is more genuine; post-hoc attribution is more general. In-context citations come from the actual generation process, and the answer really was written while looking at those documents, but the model may cite the wrong number or add decorative citations. Post-hoc attribution works with any generator and can fix unsupported content, but the answer was not generated from the cited evidence; the citations are found afterwards, and ALCE also found that closed-book generation with added citations gives poorer citation quality.
Follow-up 2: Why can't you look at citation recall alone?
Because piling on citations inflates recall. If every sentence cites all the retrieved documents, almost every claim is entailed by "all the citations", so recall is very high, but most citations are redundant and the user has to read many irrelevant documents to check. Precision must therefore be measured too, to penalize unnecessary citations.
Follow-up 3: What are the limitations of automatic citation evaluation?
The NLI judge makes mistakes, judgments are only binary, and correctness is not measured. NLI models are unreliable on multi-step reasoning and arithmetic; partially supported claims earn nothing; and a citation that fully supports a claim does not make the claim true. It therefore needs to be combined with manual spot checks and correctness metrics.
Follow-up 4: What is the difference between attribution and correctness?
Attribution measures "is there a supporting source"; correctness measures "is it true". A sentence can be fully supported by its source while the source is wrong; it can also be true without any source supporting it. The former is faithful but not factual, the latter factual but not faithful (see 4.3).
Common mistakes
- Do not equate "has a citation" with "is correct": A citation shows only that the claim is supported by a source, and the source itself may be wrong.
- Do not look at citation recall alone: Piling on citations inflates recall, so precision must be measured too.
- Do not say that citations added afterwards are as trustworthy as in-context citations: In post-hoc attribution the answer was not generated from the cited evidence.
- Do not assume that mainstream products already cite reliably: Audits show that only about half of their sentences are fully supported by their citations.
4.7 What methods can mitigate knowledge conflicts and improve faithfulness? ★¶
One-sentence answer
The methods fall into three groups: prompting (explicit instructions, opinion-based prompts, counterfactual demonstrations, quote first then answer), which costs nothing but is unstable; context-aware decoding (CAD), which amplifies the influence of the context by contrasting the output distributions with and without it, requiring no training but trusting the context unconditionally; and training methods (counterfactual data augmentation, noise training, refusal-aware training, preference optimization), which are the most fundamental but must cover several opposing situations at once to avoid overcorrection.
I will address four aspects: prompting methods, context-aware decoding, training methods, and how these methods are combined.
(1) Prompting methods need no training, but their effect depends on the model's instruction following.
- Explicit instructions: tell the model "answer only based on the given documents; if the documents do not contain the answer, say it cannot be determined from them". This helps somewhat for models that follow instructions well, but models often still mix in their own memory.
- Opinion-based prompts: Zhou et al. (2023) found that rewriting the context as a narrator's statement and then asking "according to this person, what is the answer?" makes the model more faithful to the context than asking directly. The intuition is that when asked "what did this person say", the model no longer has to judge whether the claim is true in the real world, so its memory does not interfere. This was among the most effective methods in their experiments.
- Counterfactual demonstrations: put examples in the few-shot prompt where the context contradicts common knowledge, and demonstrate answering according to the context, so the model understands that the context takes priority here.
- Quote first, separate sources: ask the model to first extract the passages that support the answer and then answer from them; or have it give both "the answer according to the documents" and "the answer from its own knowledge", showing both when they conflict.
(2) Context-aware decoding (CAD) separates the influence of the context from that of the prior and then amplifies the former.
CAD (Shi et al. 2023) targets the following problem: during generation, the influence of the context and that of prior knowledge are mixed together, and when they conflict, the prior often wins. It runs two forward passes per step, one with the context and one without; the latter represents "what the model wanted to say without looking at the documents", i.e. its prior. It then amplifies the with-context logit, subtracts part of the no-context logit, and samples (the formulas are in "Going deeper" below). In probability terms, this multiplies each token by a power of "how many times more likely it becomes once the context is added", so tokens that the context noticeably raises are amplified further, while tokens that are likely with or without the context, i.e. tokens from the prior, are relatively suppressed. For example, if the context says "in 2023 the prize went to A" but the model remembers B: with the context, A and B may have similar probabilities; without it, B is high and A is low; computing the ratio, A is strongly raised by the context and B is not, so CAD picks A. However, CAD trusts the context unconditionally: if the context is wrong, it amplifies the error; if the context is irrelevant and the model should answer from memory, it still suppresses that memory. It therefore improves only faithfulness and controllability while sacrificing robustness, and fits best where the context is reliable and must take priority, such as summarizing a given document.
(3) Training methods change the model's behavior more fundamentally, and fall into four groups by goal.
- Counterfactual data augmentation, for controllability: add training examples where the context conflicts with memory (for example the entity substitution of Longpre et al. 2021), labeled with the answer from the context. KAFT (Li et al. 2022) builds on this by adding counterfactual contexts and irrelevant contexts together: for the former the context takes priority, for the latter the model must ignore the context and answer from its own knowledge, so controllability and robustness are trained at the same time. They also found that these two abilities do not improve automatically as models get bigger; they have to be trained deliberately.
- Noise training, for robustness: mix distractor documents into the training contexts so the model learns to pick out useful information amid noise (see 4.4; RAFT is in 6.6).
- Refusal-aware training, for learning to say "I don't know": R-Tuning (Zhang et al. 2023) splits examples into "certain" and "uncertain" groups according to whether the model answers the training questions correctly, and trains the model to express certainty and uncertainty accordingly, so it learns to express uncertainty outside its knowledge boundary.
- Preference optimization, for citations, refusals and correctness together: build preference pairs of "good answer vs bad answer" and train with DPO (DPO is covered in the LLM Training Pipeline direction, Chapter 7), for example Trust-Align (see 4.6).
The shared risk of these methods is overcorrection: train only "follow the context" and the model becomes easier to mislead with misinformation; train only refusals and it becomes overly conservative. The training data must therefore include several opposing situations at once: the context is correct and conflicts with memory (trust the context), the context is irrelevant (ignore it), the context is insufficient (abstain), and the context can answer the question (must answer). What the model must learn is not a fixed leaning but choosing the right behavior according to the state of the evidence.
(4) In practice these methods are complementary, chosen by "can we train, how reliable is the context, and what the application tolerates".
A typical combination is to first use filtering to keep noise out of the context, then use a trained model or prompting to answer faithfully and abstain appropriately, and finally use citation evaluation or NLI to check whether the output is supported by the evidence. The choice mainly depends on three things: whether the model can be trained, how reliable the context is, and how much the application tolerates wrong answers versus refusals.
In summary: prompting, decoding and training excel respectively at zero cost, zero training and fundamental change; their shared trap is overcorrection, so the goal is not to make the model always trust the context but to have it choose its behavior according to the state of the evidence.
Comparing the mitigations:
| Method | Targets | Training needed | Inference cost | Main limitation |
|---|---|---|---|---|
| Prompting (instructions, opinion-based, counterfactual demos) | Faithfulness, abstention | No | ~None | Unstable; depends on instruction following |
| Pre-generation filtering (reranker, NLI, evaluator) | Robustness to noise | Filter model only | Extra scoring calls | Lower recall: useful passages get dropped |
| Context-aware decoding | Faithfulness (controllability) | No | 2 forward passes per step | Amplifies wrong context; hurts when context is irrelevant |
| Counterfactual + irrelevant-context training (e.g. KAFT) | Controllability and robustness | Yes | None | Needs constructed data; risk of over-trusting context |
| Refusal-aware tuning (e.g. R-Tuning) | Abstention, calibration | Yes | None | Risk of over-refusal; labels tied to one model's knowledge |
| Preference optimization (e.g. Trust-Align) | Citations, refusals, correctness | Yes | None | Needs careful negative design and NLI-based labels |
Going deeper: CAD's formulas and results, and how R-Tuning builds its data
(1) Two equivalent forms of CAD.
Here \(c\) is the context, \(x\) is the question, \(y_{<t}\) are the tokens generated so far, \(y_t\) is the token being generated, \(\mathrm{logit}_\theta\) and \(p_\theta\) are the logit and probability of the model with parameters \(\theta\), and \(\alpha\) controls how strongly to amplify, with \(\alpha = 0\) being ordinary decoding. The ratio in the brackets is "how many times more likely this token becomes once the context is added", and its log is exactly the pointwise mutual information (PMI) between the context and the token, so CAD reweights the original distribution by PMI.
(2) CAD's results and cost.
On summarization (\(\alpha = 0.5\)), CAD clearly improves faithfulness metrics; for example, LLaMA-30B's factKB on CNN-DM rises from 76.8 to 87.8. The gains on knowledge-conflict tasks (\(\alpha = 1\)) are larger; for example, GPT-Neo 20B's EM on NQ-Swap rises from 16.1 to 36.8. The gains on knowledge-conflict tasks also grow with model size, consistent with the finding in 4.1: the larger the model, the stronger its prior, and the more it needs suppressing. The cost is two forward passes per step, roughly doubling decoding compute (the no-context pass has a shorter prompt and can run in parallel, but it still adds cost). Later work, AdaCAD (Wang et al. 2024), measures the degree of conflict by the Jensen–Shannon divergence between the distributions with and without the context, and sets \(\alpha\) adaptively token by token: strong correction when the conflict is large and almost no intervention when it is small, which partly eases the problem with irrelevant contexts.
(3) How R-Tuning builds its data.
R-Tuning first has the model answer the training questions; those it gets right go into a "certain set" and those it gets wrong into an "uncertain set". Each example is then followed by the question "Are you sure you accurately answered the question based on your internal knowledge?", with the target "I am sure" for the certain set and "I am unsure" for the uncertain set, and the model is finetuned on this data. The paper also found that this abstention ability transfers to domains unseen in training, like a "meta-skill". Its limitation is that the labels are tied to a particular model's knowledge: for a different model, which questions are "certain" changes, and the data has to be rebuilt.
Follow-up questions
Follow-up 1: How does CAD relate to PMI?
CAD reweights the original distribution by the PMI between the context and the token. In CAD's probability form, the weight is "the probability with the context divided by the probability without it" raised to the power \(\alpha\), and the log of that ratio is the PMI. Tokens with higher PMI, i.e. those that appear mainly because of the context, are therefore amplified more.
Follow-up 2: What are CAD's limitations, and when shouldn't it be used?
CAD trusts the context unconditionally, so it should not be used when the context may be wrong or irrelevant. If the context is wrong, CAD makes the model repeat the error more firmly; if the context is irrelevant and the model should answer from memory, CAD suppresses that memory. Its decoding cost also roughly doubles. It therefore fits settings such as summarizing a given document or QA over reliable internal documents, where the context is reliable and must take priority.
Follow-up 3: Why do opinion-based prompts improve faithfulness?
Because they turn "judging a fact" into "reporting what someone said". When asked "according to this person, what is the answer?", the model does not need to judge whether the claim is true in the real world, so its own memory does not compete with the context, and it answers according to the context more readily.
Follow-up 4: Why add both counterfactual and irrelevant contexts when training for faithfulness?
To train controllability and robustness at the same time and avoid lopsidedness. With only counterfactual contexts, the model learns "always follow the context no matter what" and becomes easier to mislead with wrong or irrelevant documents; adding irrelevant contexts and requiring the model to ignore them teaches it to tell "should listen to the context" from "should ignore the context". KAFT also found that neither ability improves automatically with model scale.
Follow-up 5: If a RAG system often gives answers inconsistent with the retrieved documents, how would you diagnose and fix it?
First locate whether retrieval or generation is at fault, then apply the matching remedy. Sample the failure cases and check whether the retrieved documents contain the answer. If they do not, it is a retrieval problem: improve retrieval, or teach the model to abstain. If they do but the model did not use it, check whether it was distracted by other noisy documents (stronger filtering, noise training) or stuck to its own memory (counterfactual training, CAD, better prompts). After the fix, monitor faithfulness, accuracy and refusal rate together, so that improving one does not break another (a systematic attribution method over an evaluation set is in 6.3).
Common mistakes
- Do not say that CAD improves factuality: It improves faithfulness, and when the context is wrong it amplifies the error.
- Do not train only "follow the context": This makes the model easier to mislead with misinformation; ignoring irrelevant context must be trained too.
- Do not say that controllability and robustness improve automatically with model size: KAFT found that they must be trained deliberately.
- Do not train only refusals without the "must answer" cases: Otherwise the model becomes overly conservative.