Retrieval is Not Enough: Enhancing RAG through Test-Time Critique and Optimization

Jiaqi Wei, Hao Zhou, Xiang Zhang, Di Zhang, Zijie Qiu, Noah Wei, Jinzhe Li, Wanli Ouyang, Siqi SunNeurIPS 2025

TL;DR

Retrieval-Augmented Generation (RAG) often fails not because of poor retrieval, but because the model's internal reasoning misaligns with the retrieved evidence. This paper introduces ALIGNRAG, a test-time refinement framework that uses a specially trained Critic Language Model (CLM) to iteratively critique and correct these reasoning misalignments. By training the critic on contrastive examples, an 8B-parameter model can outperform both standard self-refinement techniques and much larger 72B models, making RAG systems significantly more reliable.

What Problem Does This Paper Address?

Standard RAG pipelines operate on a flawed assumption: if you feed a Large Language Model (LLM) the right documents, it will automatically use them correctly. The authors identify a critical, under-explored failure mode called Reasoning Misalignment.

Reasoning misalignment occurs when an LLM's internal reasoning trajectory diverges from the evidential constraints of the retrieved documents. Even with perfect retrieval, a model might:

  1. Misjudge the relevance of a specific text span.
  2. Fail to map the user's query to the correct evidence.
  3. Synthesize a conclusion that isn't logically supported by the text.

Prior work has focused heavily on improving the retriever or applying static, training-time optimizations to the generator. However, these don't fix the dynamic disconnect between the LLM's internal logic and external facts during inference. Furthermore, existing "self-correction" methods (where an LLM critiques its own output) suffer from severe self-preference bias.

Methods

The authors reconceptualize RAG as Retrieval-Augmented Reasoning and propose ALIGNRAG, a plug-and-play test-time framework.

Overview of the ALIGNRAG framework, detailing the Contextual Granularity Hierarchy, Contrastive Critique Synthesis, and the Critique-Driven Alignment loop.

The core innovations include:

  • Critique-Driven Alignment (CDA): Instead of a single-pass generation, ALIGNRAG treats inference as an iterative optimization process. A generator produces a response, a dedicated Critic Language Model (CLM) critiques it based strictly on the retrieved evidence, and the generator refines the answer.
  • Contrastive Critique Synthesis (CCS): To avoid the self-bias of standard self-critique, the authors train a dedicated CLM. They generate training data by contrasting a weak model's flawed response with a strong model's aligned response. This forces the critic to learn the specific differences grounded in the evidence, rather than just preferring its own style.
  • ALIGNRAG-AUTO: A dynamic stopping mechanism. The CLM is trained to output a [Good] or [Bad] control token before its critique. If it outputs [Good], the refinement loop terminates immediately, saving massive amounts of inference compute.

Datasets

  • Training the Critic: A 10K dataset sampled equally from five benchmarks: PopQA, TriviaQA, NaturalQuestions (NQ), 2WikiMultiHopQA, and ASQA.
  • Data Construction: They introduce a novel 4-tier Contextual Granularity Hierarchy to simulate varying degrees of answerability (e.g., injecting irrelevant docs, relevant but unhelpful docs, and partially/fully complete docs) to make the critic robust.
  • Evaluation (In-Domain): The five datasets listed above.
  • Evaluation (Out-of-Domain / OOD): HotpotQA and SQuAD.

Key Insights and Ideas

  • Self-critique is an echo chamber: LLMs evaluating their own outputs suffer from "self-preference bias," often reinforcing their own hallucinations. Training a dedicated critic on contrastive (good vs. bad) examples breaks this loop and yields highly actionable feedback.
  • David beats Goliath in critiquing: You don't need a massive model to be a good critic. An 8B-parameter model, when explicitly trained to spot evidence-reasoning mismatches via contrastive synthesis, is actually better at critiquing RAG outputs than a generic 72B-parameter model.
  • When retrieval falters, alignment thrives: ALIGNRAG acts as a powerful filter. When retrieval returns noisy or irrelevant documents, standard RAG gets confused. ALIGNRAG's critic helps isolate the actual reasoning signals, preventing noise from derailing the output.
  • Dynamic stopping is highly calibrated: You don't need to hardcode the number of refinement steps. The critic is reliable enough to know when an answer is "good enough," allowing the system to save compute on easy queries while spending more time on hard ones.

Key Results

Performance comparison showing ALIGNRAG significantly outperforming Vanilla RAG and Self-Refine, especially on Out-of-Distribution tasks.
  • OOD Generalization: The 8B ALIGNRAG model outperformed the standard Self-Refine baseline by 12.1% on out-of-domain tasks, proving it learns generalizable reasoning alignment rather than just memorizing training domains.
  • Superior Efficiency: The 8B CLM outperformed a standard 72B CLM by 2.2% in average accuracy.
  • Plug-and-Play Boost: When integrated into the existing InstructRAG pipeline (using Qwen2.5-14B), ALIGNRAG boosted OOD accuracy by 9.4% without requiring any architectural changes to the base model.
  • Auto Mode: ALIGNRAG-AUTO matched or slightly exceeded the performance of fixed-iteration setups while drastically reducing the average number of inference steps.

Limitations and Future Work

  • Extreme Retrieval Failure: If the retriever fetches absolutely nothing relevant, the critic's quality degrades. In these worst-case scenarios, the critic might "over-correct" by injecting ungrounded parametric knowledge (hallucinating facts to fix the reasoning), leading to factual drift.
  • Integration Friction: While designed as a plug-and-play module, achieving optimal performance might still require minor prompt or hyperparameter tuning depending on the specific generator LLM and RAG architecture being used.
  • Future Directions: The authors suggest further research into standardizing adaptation protocols for deploying the CLM across diverse pipelines, and developing better mitigation techniques for when retrieval completely fails.

Summary updated

BibTeX
@inproceedings{wei2025retrieval,
  author = {Jiaqi Wei and Hao Zhou and Xiang Zhang and Di Zhang and Zijie Qiu and Noah Wei and Jinzhe Li and Wanli Ouyang and Siqi Sun},
  title = {{Retrieval is Not Enough: Enhancing RAG through Test-Time Critique and Optimization}},
  booktitle = {Advances in Neural Information Processing Systems},
  year = {2025},
  url = {https://openreview.net/forum?id=cnUq7GkS6d},
}
Figure