Source-linked AI summary
When Context Misleads: Intent-Guided Decoding for Robust Retrieval-Augmented Generation
Haolin Jin, Pengyue Yang, Huaming Chen
TL;DR
RAG systems struggle to balance factuality against faithfulness when retrieved context conflicts with user intent. IGD arbitrates between retrieved context and parametric memory during decoding, improving factual-conflict performance while largely preserving faithful question answering.
Problem
Fixed trust policies cannot reliably balance strict context following with factual robustness when retrieved evidence is misleading or conflicts with world knowledge.
Method
Intent-Guided Decoding arbitrates among user, retrieved-context, and parametric-memory branches using answer-level filtering and token-level correction.
Results
IGD improves factual-conflict benchmarks across all tested models while largely preserving faithful QA, with gains reaching 65.4 percentage points over Direct RAG.
Takeaways & Limitations
The results support intent-conditioned source arbitration as a way to improve intent-aligned generation across factuality and faithfulness settings.
Takeaways & Limitations
Fixed global steering hyperparameters create a tuning trade-off: stronger correction improves factual recovery but can reduce faithful use of correct retrieved evidence.
Abstract
from arXiv · showhide
Retrieval-augmented generation (RAG) improves large language models by grounding generation in external evidence, but it also introduces a source trust problem: retrieved context may be useful, irrelevant, or even misleading. Existing RAG systems often apply a fixed trust policy toward retrieved evidence, which can either over-trust incorrect context or underuse context when the user explicitly asks for context-following behavior. Therefore, we propose Intent-Guided Decoding (IGD), a framework that arbitrates between retrieved context and parametric memory according to user intent. IGD uses answer-level filtering and token-level correction to steer the final decoding trajectory between retrieved context and parametric memory. We evaluate IGD on three faithful QA benchmarks and three factual-conflict benchmarks across five LLMs, IGD substantially improves factual recovery, achieving gains of up to 65.4 percentage points on factual-conflict benchmarks over Direct RAG, while preserving or improving strict context-following behavior, this findings highlight the importance of balancing factuality and faithfulness in RAG.
I. INTRODUCTION · II. RELATED WORK
RAG extends LLMs with external evidence but must arbitrate between retrieved context and parametric memory because context can be useful, unsupported, contradictory, or misleading. IGD addresses this intent-dependent trade-off through decoding-time memory filtering and token-level correction, while prior work examines retrieval, faithfulness, hallucination, and knowledge conflict.
- I. INTRODUCTION: RAG connects LLMs to updatable external knowledge, extending static parametric memory for knowledge-intensive tasks such as open-domain question answering.
- I. INTRODUCTION: RAG systems may generate unsupported or contradictory statements, and benchmarks show that even strong LLMs often fail to remain faithful to provided context.RAGTruth annotates this issue, while FaithEval constructs 4.9K examples across unanswerable and inconsistent settings.
- I. INTRODUCTION: RAG faces a faithfulness–factuality trade-off because users may request either strict context following or skepticism toward misleading retrieved evidence.
- I. INTRODUCTION: IGD formulates this trade-off as intent-conditioned source arbitration between retrieved context and parametric memory during decoding.Its activation gate detects conflict, confidence determines movement toward context or memory, and reliability scaling controls intervention strength.
- I. INTRODUCTION: IGD combines answer-level memory filtering with conservative token-level correction over user, context, and memory branches after retrieval has occurred.This distinguishes IGD from retrieval-centric methods that improve what or when to retrieve and from methods that generally encourage stronger context adherence.
- II. RELATED WORK: Prior RAG systems differ in how they retrieve, encode, and consume evidence, including Fusion-in-Decoder, Atlas, and In-Context RALM.
- II. RELATED WORK: Related work studies hallucination, contextual faithfulness, and conflicts between internal knowledge and external evidence in RAG.RAGTruth, FaithEval, and ClashEval show that retrieved evidence may not prevent unsupported generation, models may fail under difficult contexts, and incorrect retrieved content can override correct internal knowledge.
- II. RELATED WORK: Context-DPO improves context faithfulness through preference optimization, whereas IGD focuses on decoding-time arbitration between competing knowledge sources.
III. METHOD · A. Conditioned Branches · B. Answer-Level Memory Filter
IGD arbitrates between retrieved context and parametric memory at answer and token granularities. It uses conditioned user, context, and memory branches, conservatively replacing answers only when memory dominance is high-confidence and otherwise applying token-level correction.
- III. METHOD: IGD separates source arbitration into answer-level memory filtering and token-level correction around the original user prompt.High-confidence cases receive hard replacement; all remaining examples use continuous token-level adjustment.
- A. Conditioned Branches: At decoding step t, the original user branch puser,t(v) reflects the instruction, question, and retrieved context.IGD augments this standard RAG branch with conditional context and memory branches.
- A. Conditioned Branches: The context branch pctx,t(v) is explicitly instructed to answer according to the supplied context.IGD instantiates it with a support snippet selected from retrieved context rather than the full context, representing the locally relevant evidence.
- A. Conditioned Branches: The memory branch pmem,t(v) answers closed-book, independently of supplied context, while the user branch remains the unmodified RAG branch.The memory branch estimates parametric support after retrieved context is removed.
- A. Conditioned Branches: M = 3 prompt variants ensemble the memory branch to stabilize closed-book decoding.The ensemble includes a base memory prompt and additional prompt variants.
- B. Answer-Level Memory Filter: The answer-level filter targets cases where memory strongly prefers its preview over the context preview and the user branch does not prefer the context preview.It compares a context preview ˆyctx with a memory preview ˆymem selected from the memory ensemble.
- B. Answer-Level Memory Filter: ρM = 3.0 and ρU = 1.0 are the default thresholds for direct memory routing.The memory branch must prefer the memory candidate by at least a factor of three, while the user branch must not prefer the context candidate; otherwise decoding falls back to token-level correction.
C. Token-Level Correction
IGD performs token-level source arbitration by gently adjusting next-token scores when retrieved context and parametric memory disagree, while retaining the original user distribution. A scalar λ_t controls the intervention’s direction and magnitude, favoring context, memory, or minimal change depending on its value.
- C. Token-Level Correction: IGD gently adjusts next-token scores around the original user distribution when context and memory branches disagree, rather than replacing the distribution.This decoding-time intervention steers generation without updating model parameters.
- C. Token-Level Correction: λ_t controls intervention direction and magnitude: positive values favor context, negative values favor memory, and near-zero values preserve the original user distribution.IGD computes λ_t through activation, direction, and reliability scaling.
1) Activation:
IGD activates intervention when the context and memory branches produce meaningfully different next-token distributions. It measures conflict with Jensen–Shannon divergence and applies a soft gate that increases correction as conflict rises.
- Activation:: IGD measures step-t distributional conflict between context and memory branches using Jensen–Shannon divergence.Intervention is intended only when the branches provide meaningfully different next-token distributions.
- Activation:: For efficiency, IGD computes JSD over a renormalized topK token set with K = 16 instead of the full vocabulary.The conflict score is then converted into a soft activation gate.
- Activation:: With τlow = 0.10, τhigh = 0.35, and γ = 2.0, the gate suppresses correction when branches agree and gradually activates it as conflict increases.This creates a soft transition from no intervention to stronger correction.
2) Confidence Direction: · 3) Reliability Scaling:
IGD selects an intervention direction from user instruction mode and branch-level confidence, then scales its magnitude by the favored source’s reliability. This design prioritizes context for strict-following prompts, memory for truth-seeking prompts, and limits influence from poorly supported or unstable predictions.
- 2) Confidence Direction:: IGD combines instruction mode with branch-level confidence to determine whether context or parametric memory should be favored.Confidence uses entropy of each branch’s renormalized top-K next-token distribution, with lower entropy indicating higher confidence.
- 2) Confidence Direction:: The instruction-mode priors are dstrict = 0.9 for strict context following and dtruth = 0.3 for truth seeking.These values encode the prior probability of trusting retrieved context under each instruction mode.
- 2) Confidence Direction:: The intervention direction remains intent-consistent but can switch when one branch is substantially more confident than the other.Strict-following prompts begin with a strong context prior, whereas truth-seeking prompts begin with a memory prior.
- 3) Reliability Scaling:: IGD rescales the base coefficient by the reliability of the favored source to prevent unsupported context or unstable memory from exerting excessive influence.The base coefficient determines direction, while reliability controls intervention magnitude.
- 3) Reliability Scaling:: When λbase,t > 0, context reliability combines local preview support, snippet evidential quality, and whether the preview is a valid short-form answer.The context branch is favored when the base coefficient is positive.
- 3) Reliability Scaling:: When λbase,t < 0, IGD favors memory and scales the intervention by the stability of closed-book memory previews.Memory stability is based on average pairwise answer consistency among the M previews, with AnsCons(·, ·) measuring answer equivalence.
- 3) Reliability Scaling:: IGD intervenes only under source conflict, choosing direction from intent and confidence and scaling the token-level update by favored-source reliability.The final coefficient combines the direction-setting base coefficient with the corresponding reliability estimate.
IV. EXPERIMENT SETUP … C. Models and Baselines
The evaluation tests IGD under two user-intent modes across faithful and factual-conflict QA settings. It uses six benchmarks, five instruction-tuned LLMs, and comparisons against six baselines, including Closed-book Q-only and Direct RAG.
- A. Evaluation Design: STRICT mode requires answers to follow the provided context, whereas TRUTH mode prioritizes factual correctness when context conflicts with world knowledge.These prompt modes represent distinct user intents for context following versus factual recovery.
- A. Evaluation Design: The faithful group tests whether IGD preserves retrieval benefits, while the factual-conflict group tests context following in STRICT mode and world-knowledge recovery in TRUTH mode.The evaluation separates contexts supporting the gold answer from contexts that conflict with the world answer.
- B. Benchmarks: 6 QA benchmarks, each with 500 samples, are divided into three faithful and three factual-conflict benchmarks.The faithful benchmarks include KILT-NQ, TriviaQA, and SQuAD.
- B. Benchmarks: The faithful benchmark suite includes KILT-NQ, TriviaQA, and SQuAD, covering Natural Questions/KILT Wikipedia, trivia questions with answer aliases and evidence, and paragraph-level reading comprehension.The passage identifies the source or format associated with each benchmark.
- C. Models and Baselines: IGD is evaluated on five instruction-tuned LLMs spanning different model families and scales: Qwen3-32B, Qwen2.5-14B-Instruct, Llama-3-8B-Instruct, Mistral-7B-Instruct-v0.3, and Phi-4 14B.This design tests generalization across differing parametric knowledge and instruction-following behavior.
- C. Models and Baselines: Six baselines are used, including Closed-book Q-only as a parametric-knowledge diagnostic and Direct RAG, which generates from the original prompt without source arbitration.Direct RAG receives the same question, context, and prompt-mode instruction as IGD.
D. Evaluation Metrics · V. RESULTS · A. Closed-Book Performance Reveals the Recoverable Parametric Signal
The paper evaluates intent-aligned behavior using mode-specific accuracy and an aggregate Intent-Aligned Score, then examines how closed-book performance bounds factual recovery from misleading context. Closed-book results show strong variation across benchmarks, with factual-conflict answers often more recoverable from parametric memory than faithful-benchmark answers.
- D. Evaluation Metrics: Faithful benchmarks use gold-answer accuracy, while factual-conflict benchmarks report context accuracy in STRICT mode and world accuracy in TRUTH mode.Evaluation uses normalized alias matching.
- D. Evaluation Metrics: Intent-Aligned Score is the macro-average across faithful and factual-conflict benchmark groups.IA measures alignment with the user’s intended trust policy rather than a fixed preference for context or memory.
- A. Closed-Book Performance Reveals the Recoverable Parametric Signal: Closed-book evaluation provides only the question, establishing whether the model can access the correct answer from parametric memory before IGD correction.If closed-book recovery fails, memory-oriented correction has a naturally limited upper bound.
- V. RESULTS: Table I compares truth-mode performance across three faithful and three factual-conflict benchmarks, reporting IA and IGD’s deltas against Direct RAG.Bold and underline identify the best and second-best context-using methods in each column.
- A. Closed-Book Performance Reveals the Recoverable Parametric Signal: Across five models, KILT-NQ closed-book accuracy remains around the mid 30% range, while SQuAD is mostly around 25-32%.These faithful benchmarks rely heavily on provided context.
- A. Closed-Book Performance Reveals the Recoverable Parametric Signal: 73.0%-92.8%: CounterFact achieves this closed-book accuracy range across all models, making it the easiest factual-conflict benchmark.The result suggests many subject-relation facts remain accessible from parametric memory.
- A. Closed-Book Performance Reveals the Recoverable Parametric Signal: 91.5%: Qwen2.5-14B reaches this closed-book accuracy on NQ-Swap, while Phi-4 reaches 60.0%.NQ-Swap is highly recoverable for several models, whereas ConflictBank is more challenging.
- A. Closed-Book Performance Reveals the Recoverable Parametric Signal: Misleading RAG contexts can obscure correct answers even when those answers remain recoverable from model memory.This motivates evaluating parametric recovery as a basis for memory-oriented correction.
B. Truth Prompting Alone Does Not Calibrate Context Trust · C. IGD Balances Factuality and Faithfulness
Truth-seeking prompts and existing source-selection baselines do not reliably calibrate trust in misleading retrieved context. IGD improves factual recovery while preserving or improving strict context-following behavior, balancing factuality with faithfulness.
- B. Truth Prompting Alone Does Not Calibrate Context Trust: Truth-seeking instructions alone leave Direct RAG vulnerable to incorrect context across models on factual-conflict benchmarks.Truth mode asks models to prioritize correct answers and treat potentially misleading context skeptically, yet Direct RAG still performs poorly.
- B. Truth Prompting Alone Does Not Calibrate Context Trust: Answer-level reasoning, confidence-based selection, and multi-agent aggregation often improve over Direct RAG but do not fully solve conflicting-context failures.ExplicitSCR, RCR, and MADAM-RAG target situated faithfulness or conflicting evidence through reasoning, confidence extraction, or aggregation.
- C. IGD Balances Factuality and Faithfulness: IGD improves the IA score over Direct RAG for every model, with gains of 23.0 points for Qwen3-32B, 19.5 for Qwen2.5-14B, 9.6 for Llama-3-8B, 11.5 for Mistral-7B, and 10.2 for Phi-4.The improvements are driven primarily by factual-conflict benchmarks while largely preserving faithful QA accuracy.
- C. IGD Balances Factuality and Faithfulness: External baselines can perform strongly on individual conflict columns but often sacrifice faithful-benchmark accuracy through global answer-level source decisions.RCR-style methods may recover more world-knowledge answers on particular conflict sets while sharply reducing faithful accuracy; MADAM-RAG shows a similar trade-off on some conflict cases.
- C. IGD Balances Factuality and Faithfulness: 65.4 percentage points is IGD’s largest gain over Direct RAG, achieved on Qwen3-32B CounterFact, while IGD improves every factual-conflict benchmark across all models.On faithful benchmarks, IGD remains close to Direct RAG, with moderate drops much smaller than its factual-conflict gains.
- C. IGD Balances Factuality and Faithfulness: Parametric recovery rate measures the fraction of the Direct RAG-to-closed-book Q-only gap that IGD recovers on factual-conflict benchmarks.Figure 2 uses PRR to quantify how much recoverable parametric signal is restored.
- C. IGD Balances Factuality and Faithfulness: Qwen3-32B recovers most of the performance gap on NQ-Swap and CounterFact, whereas Mistral-7B exhibits weaker recovery.Recovery is bounded by the model’s accessible parametric knowledge and the reliability of the memory branch, indicating that IGD restores suppressed answers rather than inventing new facts.
- C. IGD Balances Factuality and Faithfulness: In strict mode, IGD preserves and often improves context-following behavior by evaluating factual-conflict benchmarks with context accuracy.The mode explicitly asks models to follow supplied evidence, including when it conflicts with world knowledge; IGD therefore uses prompt mode to direct intervention rather than simply discounting retrieval.
VI. FACTUALITY AND FAITHFULNESS TRADE-OFF
IGD balances factual recovery and context faithfulness through coordinated source arbitration rather than a single heuristic. Its performance exposes trade-offs in steering strength, output behavior, and snippet-localization quality.
- Component ablations: Removing token-level correction reduces truth-mode factual world accuracy from 73.7 to 52.8 and strict-mode factual context accuracy from 90.1 to 83.1.The ablation identifies token-level correction as the main steering mechanism under misleading context.
- Component ablations: A single memory view reduces factual recovery to 54.5, while removing activation or reliability gates degrades both faithful and factual columns.These results indicate that memory correction requires a stable closed-book signal and conflict-triggered, reliability-scaled intervention.
- Hyperparameter sensitivity: Increasing λmax improves factual world accuracy but decreases faithful accuracy, while smaller dtruth improves factual recovery but increases deviation from correct retrieved evidence.Fixed global steering hyperparameters therefore create a tuning trade-off between resisting misleading context and following reliable context.
- Output analysis: 57.9% of Direct RAG outputs follow misleading context and 25.8% recover the correct world answer, whereas IGD reaches 58.3% correct answers and 22.5% misleading-context answers.The output analysis distinguishes factual recovery from copying misleading context.
- Localization analysis: GPT-5 localization raises faithful snippet accuracy from 83.0% to 99.0% and factual snippet accuracy from 79.0% to 87.0%, revealing a mismatch with downstream IGD performance.Improved standalone snippet support does not necessarily improve IGD, because localization or scoring may introduce judgment biases and objective mismatch.
VII. CONCLUSION
The paper presents Intent-Guided Decoding (IGD) as a decoding-time framework for resolving the factuality–faithfulness trade-off in retrieval-augmented generation. IGD arbitrates among the user prompt, retrieved context, and parametric memory according to intent, improving intent-aligned generation across multiple LLMs.
- IGD is a decoding-time framework for resolving the factuality and faithfulness trade-off in retrieval-augmented generation.
- IGD performs intent-conditioned source arbitration across the user prompt, retrieved context, and parametric memory.
- Experiments on faithful and factual-conflict benchmarks show that IGD improves intent-aligned generation across multiple LLMs.