KARE-RAG: Knowledge-Aware Refinement and Enhancement for RAG

Yongjian Li, HaoCheng Chu, Yukun Yan, Zhenghao Liu, Shi Yu, Zheni Zeng, Ruobing Wang, Sen Song, Zhiyuan Liu, Maosong Sun · OpenReview

Abstract

Retrieval-Augmented Generation (RAG) enables large language models (LLMs) to access broader knowledge sources, yet factual inconsistencies persist due to noise in retrieved documents—even with advanced retrieval methods. We demonstrate that enhancing generative models' capacity to process noisy content is equally critical for robust performance. In this paper, we present KARE-RAG (Knowledge-Aware Refinement and Enhancement for RAG), which improves knowledge utilization through three key innovations: (1) structured knowledge representations that facilitate error detection during training, (2) Dense Direct Preference Optimization (DDPO)—a refined training objective that prioritizes correction of critical errors, and (3) a contrastive data generation pipeline that maintains semantic consistency while rectifying factual inaccuracies. Experiments show our method significantly enhances standard RAG pipelines across model scales, improving both in-domain and out-of-domain task performance without compromising general capabilities. Notably, these gains are achieved with modest training data, suggesting data-efficient optimization is possible through targeted learning strategies.

1. Introduction

Retrieval-Augmented Generation (RAG) has become the gold standard for grounding Large Language Models (LLMs) in external, up-to-date information. However, RAG suffers from a persistent "noise" problem: search engines often return irrelevant snippets, outdated facts, or conflicting documents. While most research focuses on improving retrievers, KARE-RAG argues that the generator's ability to filter and process this messy context is equally vital. We propose a framework that optimizes how models organize and utilize retrieved knowledge to maintain factual grounding even when inputs are inconsistent.

2. Methodology

The KARE-RAG framework introduces three major innovations to improve model robustness against retrieval noise.

2.1 Knowledge-Aware Pipeline (KA-RAG)

Instead of generating answers directly from raw documents, the KA-RAG pipeline decomposes the process into structured steps. The model first extracts entities and relationships into a Knowledge Graph (KG). This structured representation acts as a natural noise filter, discarding irrelevant "fluff." The model then performs Chain-of-Thought (CoT) reasoning over the graph before producing the final answer.

Overview of the KARE-RAG framework, illustrating the Knowledge-Aware Pipeline (left) and the optimization process (right).

2.2 Dense Direct Preference Optimization (DDPO)

Standard Direct Preference Optimization (DPO) treats every word in a sentence with equal importance. KARE-RAG introduces Dense Direct Preference Optimization (DDPO), which utilizes token-level importance weighting. By identifying specific "critical" tokens where factual errors occur, DDPO forces the model to prioritize these differences during training. A supervised fine-tuning (SFT) loss term is included to maintain training stability.

2.3 Automated Contrastive Data Generation

To provide a dense learning signal, we developed an LLM-powered pipeline that generates high-quality contrastive pairs. An "expert" model identifies factual errors in a generator's output and performs targeted patches. This creates pairs where the "good" and "bad" versions are semantically nearly identical but differ precisely on factual grounds, teaching the model to spot subtle nuances.

3. Experimental Results

We evaluated KARE-RAG using a diverse set of benchmarks, including Musique (in-domain) and several out-of-domain (OOD) datasets such as Natural Questions (NQ), HotpotQA, and PopQA.

3.1 Quantitative Performance

KARE-RAG demonstrated significant improvements across various model scales, including Llama-3.1 (8B) and Qwen-2.5 (14B). For the Llama-3.1-8B model, KARE(DDPO) achieved an average gain of +4.18% in Exact Match (EM) and +3.52% in F1 score on OOD tasks compared to vanilla RAG baselines.

Performance comparison across multiple LLM architectures and benchmarks, showing consistent gains with KARE(DDPO).

3.2 Reasoning and Generalization

Beyond standard QA, KARE-RAG excels in complex reasoning. On the IRCOT (Iterative Retrieval CoT) pipeline, the Llama-3.1-8B model saw a +10.6% accuracy boost. Importantly, the framework preserves general capabilities; MMLU-Pro scores actually saw a slight increase (from 43.97 to 44.60), proving that specialized RAG training does not necessitate a loss in general intelligence.

4. Discussion

A key insight from our ablation studies is that structure acts as a filter. Converting unstructured text into a Knowledge Graph was significantly more effective than using summaries or keypoints. In fact, unstructured summaries occasionally decreased performance, whereas KGs consistently improved grounding. Furthermore, the success of KARE-RAG using only ~2,400 training pairs suggests that the quality and density of the contrastive signal are more critical than dataset volume.

5. Conclusion

KARE-RAG establishes a new direction for RAG improvement by focusing on how models learn to process retrieved content. By integrating structured knowledge representations with dense preference optimization, we significantly enhance factual robustness across diverse inference paradigms. Future work will explore expanding these structured representations to include temporal and hierarchical data models.

Summary updated

BibTeX
@misc{li2025kare,
  author = {Yongjian Li and HaoCheng Chu and Yukun Yan and Zhenghao Liu and Shi Yu and Zheni Zeng and Ruobing Wang and Sen Song and Zhiyuan Liu and Maosong Sun},
  title = {{KARE-RAG: Knowledge-Aware Refinement and Enhancement for RAG}},
  year = {2025},
  eprint = {2506.02503},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/2506.02503},
}
Figure