Introduction: The Preference Gap in RAG
Standard Retrieval-Augmented Generation (RAG) systems operate on a simple premise: find documents similar to a query and feed them to a Large Language Model (LLM). However, a fundamental friction exists: vector similarity does not equal reasoning utility.
Preliminary analysis reveals a "preference gap" where documents with high similarity scores often mislead LLMs (Unaligned Knowledge), while documents with low similarity—sometimes ranked as low as 100th by the retriever—can be the key to a correct answer (Aligned Knowledge). This gap exists because retrievers and LLMs are often separate components with different architectures and training objectives. The challenge is creating a system where the retriever "understands" what specific type of information its specific LLM reader needs to succeed.
The DPA-RAG Framework
To bridge this gap, the authors propose DPA-RAG (Dual Preference Alignment for RAG). This framework aligns both the external retriever and the internal LLM reader to the model's specific reasoning needs through a three-stage process.
1. Preference Knowledge Construction
The system first identifies what the LLM "likes" by categorizing document-query pairs into four conditions:
- Both Correct: Both direct answer and reference answer are correct.
- Aligned Knowledge: Direct answer is incorrect, but reference answer is correct (the document helps).
- Unaligned Knowledge: Direct answer is correct, but reference answer is incorrect (the document distracts).
- Both Incorrect: Both are incorrect.
To overcome data scarcity, five query augmentation strategies (Rephrasing, Complexity, Decomposition, Constraint, and SPARQL) are used to synthesize a high-quality preference dataset.
2. External Alignment (Reranker-LLM)
A reranker is fine-tuned to act as a bridge using a multi-task loss function that combines point-wise alignment (identifying beneficial documents), pair-wise alignment (ranking "winner" documents over "losers"), and contrastive alignment (pulling representations of queries and "aligned" documents closer in the embedding space).
3. Internal Alignment (LLM Self-Alignment)
Before final Supervised Fine-Tuning (SFT), a "pre-aligned" phase trains the LLM to implicitly distinguish between positive and negative knowledge. This "warms up" the model's ability to ignore noise and focus on helpful facts.
Evaluation and Results
The framework was evaluated on four diverse benchmarks: NaturalQuestions (NQ), TriviaQA (TQA), HotpotQA (HQA), and WebQuestionsSP (WebQSP). DPA-RAG consistently outperformed specialized RAG methods like REPLUG and RA-Judgement.
On the LLaMA2-7B model, it showed a performance boost of over 5% across all datasets compared to traditional RAG. The framework proved effective for both open-source models (LLaMA2, LLaMA3, Qwen2, Mistral) and black-box models (GPT-3.5, GPT-4).
Key Insights
- The "Unaligned" Trap: High-similarity documents often hurt performance. Mining for "Unaligned Knowledge" allows the reranker to filter out "distractor" documents that look relevant but are misleading.
- Similarity vs. Preference: The final reranking score combines similarity and LLM preference, suggesting the LLM's "opinion" is a necessary corrective lens.
- Sequential Training: Training the LLM on preference data before SFT is more stable than mixing the data, avoiding optimization conflicts.
- Scaling Laws: While standard RAG performance tends to plateau, DPA-RAG provides steady improvements as the model scales, suggesting preference alignment becomes more valuable as models get smarter.
Limitations
While powerful, DPA-RAG involves upfront costs for data synthesis via LLMs like GPT-3.5-turbo and introduces additional inference latency due to the reranking step. Future work may explore cross-domain generalization in specialized fields like medicine or law.
Summary updated