Divide-Then-Align: Honest Alignment based on the Knowledge Boundary of RAG

Xin Sun, Jianan Xie, Zhongqi Chen, Qiang Liu, Shu Wu, Yuehe Chen, Bowen Song, Zilei Wang, Weiqiang Wang, Liang Wang

Abstract

Large language models (LLMs) augmented with retrieval systems have significantly advanced natural language processing tasks by integrating external knowledge sources, enabling more accurate and contextually rich responses. To improve the robustness of such systems against noisy retrievals, Retrieval-Augmented Fine-Tuning (RAFT) has emerged as a widely adopted method. However, RAFT conditions models to generate answers even in the absence of reliable knowledge. This behavior undermines their reliability in high-stakes domains, where acknowledging uncertainty is critical. To address this issue, we propose Divide-Then-Align (DTA), a post-training approach designed to endow RAG systems with the ability to respond with “I don’t know” when the query is out of the knowledge boundary of both the retrieved passages and the model’s internal knowledge. DTA divides data samples into four knowledge quadrants and constructs tailored preference data for each quadrant, resulting in a curated dataset for Direct Preference Optimization (DPO). Experimental results on three benchmark datasets demonstrate that DTA effectively balances accuracy with appropriate abstention, enhancing the reliability and trustworthiness of retrieval-augmented systems.

Introduction

Retrieval-Augmented Generation (RAG) systems pull in external documents to help Large Language Models (LLMs) answer questions. Because retrievers often fetch irrelevant "noisy" documents, researchers developed Retrieval-Augmented Fine-Tuning (RAFT) to train models to ignore this noise. However, RAFT introduces a significant reliability flaw: it conditions models to always answer. If a query falls outside both the LLM's internal parametric knowledge and the retrieved documents, a RAFT-trained model will likely hallucinate a guess rather than admit ignorance. In high-stakes fields like medicine or law, this behavior is dangerous. This paper introduces Divide-Then-Align (DTA), a post-training method that maps the combined knowledge boundaries of the LLM and the retriever to teach principled abstention.

Methodology: The Divide-Then-Align (DTA) Framework

The DTA approach consists of two primary steps designed to establish and align the model with its knowledge boundaries.

1. Divide (Knowledge Quadrants)

The authors argue that a RAG system's knowledge boundary is the union of the LLM's internal knowledge ($KB_{param}$) and the retriever's external knowledge ($KB_r$). Training queries are divided into four quadrants based on whether the information exists in either source:

  • ✔✔: Both the LLM and the retrieved text contain the answer.
  • ✔✘: Only the LLM knows the answer (retrieval failed or was noisy).
  • ✘✔: Only the retrieved text has the answer (LLM lacks internal knowledge).
  • ✘✘: Neither source contains the answer.

2. Align (Preference Optimization)

A dataset of 10,000 preference samples is constructed for these quadrants. In the ✘✘ quadrant, the "chosen" response is "I don't know," while "rejected" responses are hallucinations. In other quadrants, the chosen response is the correct answer, and rejected responses are errors caused by ignoring context or falling for noise.

Overview of the DTA framework, showing knowledge quadrant division and preference construction.

Training utilizes Direct Preference Optimization (DPO) combined with a Supervised Fine-Tuning (SFT) loss to maintain generation quality. Additionally, a novel classification loss forces the model to predict which knowledge quadrant a query belongs to, enhancing its self-awareness.

Experimental Results

Evaluations were conducted on Natural Questions (NQ), TriviaQA, and WebQuestions (WebQ) using LLaMA-2 and LLaMA-3 models.

Performance and Abstention

DTA demonstrates a massive boost in abstention capabilities without compromising accuracy. As shown in the results table, standard RAFT models (like RAAT and Ret-Robust) often suffer from an Abstain Recall of 0.0%, meaning they never refuse to answer. In contrast, DTA achieves high Abstain F1 scores (e.g., 64.7% on LLaMA-3-8B) while simultaneously reaching the highest overall accuracy (OQ Acc) across all tested model sizes.

Performance comparison of DTA against baselines across three LLaMA model variants.

Robustness and Generalization

DTA maintained strong performance when tested on out-of-domain medical data (PubMedQA) and counterfactual contexts (ConFiQA-QA). This suggests that the "honest" alignment generalizes beyond the specific trivia datasets used during training.

Key Insights and Discussion

  • RAG Boundaries as a Union: By considering both internal and external knowledge, DTA avoids forcing the model to abstain when it actually knows the answer internally, a common pitfall in simpler alignment methods.
  • The Necessity of SFT: Standard DPO can focus too much on penalizing rejected responses. Adding an SFT loss on the "chosen" responses was critical to maintaining high answer accuracy while learning to abstain.
  • Learning from Mistakes: The authors found that including the LLM's own hallucinations as "rejected" samples was vital. Without seeing its own potential mistakes, the model becomes overly eager to answer, ruining its ability to recognize its boundaries.

Conclusion

DTA successfully addresses the "always-answer" bias inherent in RAFT-trained models. By explicitly mapping knowledge quadrants and using preference optimization, it creates RAG systems that are both more accurate and more honest. Future work may focus on better estimating internal knowledge boundaries, as current sampling methods can be sensitive to specific prompting.

Summary updated

BibTeX
@inproceedings{sun2025divide,
  author = {Xin Sun and Jianan Xie and Zhongqi Chen and Qiang Liu and Shu Wu and Yuehe Chen and Bowen Song and Zilei Wang and Weiqiang Wang and Liang Wang},
  title = {{Divide-Then-Align: Honest Alignment based on the Knowledge Boundary of RAG}},
  booktitle = {Annual Meeting of the Association for Computational Linguistics},
  year = {2025},
  url = {https://openreview.net/forum?id=LEfrWPOzZr},
}
Figure