KnowPO: Knowledge-Aware Preference Optimization for Controllable Knowledge Selection in Retrieval-Augmented Language Models

Ruizhe Zhang, Yongxin Xu, Yuzhen Xiao, Runchuan Zhu, Xinke Jiang, Xu Chu, Junfeng Zhao, Yasha Wang

Introduction: The RAG Knowledge Conflict

Retrieval-Augmented Generation (RAG) has become the standard architecture for grounding Large Language Models (LLMs) in factual, up-to-date information. By providing models with external documents, RAG significantly reduces hallucinations. However, this approach introduces a fundamental challenge: the "knowledge conflict." When a model's internal training data contradicts the retrieved external evidence, the model often fails to navigate this discrepancy correctly.

As illustrated in the figure below, models typically fall into two failure modes:

  1. Contextual Ignorance: The model stubbornly adheres to its internal (and potentially outdated) parameters, ignoring helpful retrieved evidence.
  2. Contextual Overinclusion: The model becomes overly obedient, following irrelevant or noisy information in the retrieved documents even when its internal knowledge is accurate.
An illustration of how LLMs behave when encountering knowledge conflicts, highlighting the gap between ideal behavior and common errors.

Existing solutions, such as standard instruction-tuning, often fail to provide the explicit "negative signals" required to teach a model which behaviors to avoid. To address this, we introduce KnowPO (Knowledge-aware Preference Optimization), a framework designed to optimize the model's ability to select between internal and external knowledge.

The KnowPO Framework

KnowPO leverages Direct Preference Optimization (DPO) to refine model behavior by explicitly penalizing common RAG errors. The methodology focuses on three core innovations:

Preference Data Construction

Unlike traditional Supervised Fine-Tuning (SFT) which only provides positive examples, KnowPO constructs pairs of "Preferred" vs. "Rejected" responses. By simulating scenarios of contextual ignorance and overinclusion, the model learns to distinguish between valid evidence and distracting noise. For instance, a rejected sample might show the model selecting a noisy distractor from a document instead of the correct answer known to its internal memory.

Length Alignment and Rewriting

DPO is susceptible to "length bias," where models learn to prefer longer answers regardless of factual accuracy. KnowPO employs a rewriting strategy to ensure that positive and negative samples have comparable lengths. This forces the model to optimize for knowledge selection rather than superficial verbosity.

Balancing Adherence and Robustness

The research identifies a zero-sum trade-off between adherence ($R_{Ad}$—following context) and robustness ($R_{Ro}$—ignoring noise). KnowPO introduces a tunable data ratio ($R_{error}$) to balance these objectives. Empirical results suggest that a 1:1 ratio ($R_{error} = 1$) provides the optimal equilibrium for general-purpose RAG systems.

Experimental Evaluation

KnowPO was evaluated using several rigorous benchmarks:

  • SQuAD 2.0: The primary source for constructing training and validation sets.
  • RGB & KNOT: Specialized datasets for testing counterfactual knowledge and knowledge conflicts.
  • CMB (Chinese Medical Benchmark): A domain-specific test to evaluate generalization in complex fields like medicine.

Key Results and Analysis

KnowPO was tested on Baichuan2-7B and Llama2-13B, consistently outperforming established baselines such as KAFT and CAD.

Main performance comparison showing KnowPO's significant lead over other baseline methods across multiple datasets and metrics.

Performance Gains

On the SQuAD 2.0-Eval dataset, KnowPO achieved massive improvements. Adherence ($R_{Ad}$) increased by 37% to 125%, while noise robustness ($R_{Ro}$) saw a staggering improvement of 80% to 416% compared to base models. These results demonstrate that KnowPO effectively teaches models to ignore "hard" irrelevant documents that typically confuse standard RAG systems.

Overcoming Internal Bias

LLMs are notoriously difficult to "convince" when they possess high confidence in their internal knowledge (high prior probability). KnowPO successfully mitigates this hurdle, making models more flexible and responsive to external context even when it contradicts strong internal beliefs.

Domain Generalization

Interestingly, the reasoning patterns learned by KnowPO on general knowledge datasets transferred effectively to the medical domain (CMB). This suggests that KnowPO is not merely teaching the model new facts, but rather a generalizable skill for intelligent knowledge selection.

Conclusion and Future Work

KnowPO represents a significant advancement in making RAG systems more controllable and reliable. By utilizing preference optimization to provide negative signals, it successfully navigates the tug-of-war between internal and external knowledge. Future research will focus on more complex retrieval scenarios involving multi-hop reasoning and multiple conflicting documents, as well as reducing the computational cost of generating high-quality preference pairs.

Summary updated

BibTeX
@inproceedings{zhang2025knowpo,
  author = {Ruizhe Zhang and Yongxin Xu and Yuzhen Xiao and Runchuan Zhu and Xinke Jiang and Xu Chu and Junfeng Zhao and Yasha Wang},
  title = {{KnowPO: Knowledge-Aware Preference Optimization for Controllable Knowledge Selection in Retrieval-Augmented Language Models}},
  booktitle = {AAAI Conference on Artificial Intelligence},
  year = {2025},
  doi = {10.1609/aaai.v39i24.34783},
}
Figure