Introduction
Large Language Models (LLMs) are trained on vast datasets, leading them to develop strong internal "beliefs" known as parametric knowledge. However, in practical applications like Retrieval-Augmented Generation (RAG), models must often prioritize external information (contextual knowledge) or specific user-defined rules (instruction knowledge). When these sources conflict, LLMs frequently exhibit "obstinacy," favoring their pre-trained biases over provided evidence or explicit instructions.
Researchers from UIUC and UVA address this challenge in their paper, "Establishing Knowledge Preference in Language Models." They propose a unified framework to enforce a clear knowledge hierarchy: Instruction ≻ Context ≻ Parametric. By fine-tuning a 7B-parameter model on a specialized synthetic dataset, they demonstrate that models can be taught to "play favorites" correctly, significantly improving reliability in complex reasoning tasks.
The HIERPREF Framework
The core of the proposed solution is HIERPREF, a framework designed to bake a knowledge hierarchy directly into a model's weights. The hierarchy dictates that if a user provides a hypothetical premise (Instruction), it must take precedence. In the absence of such instructions, the model should rely on the provided documents (Context). Internal memory (Parametric) should only be used as a final fallback.
Data Synthesis and Conflict Generation
To internalize this hierarchy, the authors synthesized a dataset of approximately 7,400 "knowledge conflict" examples. The synthesis process involved:
- Single-hop Conflict Generation: Creating counterfactual questions where a user's assumption intentionally contradicts a provided Wikipedia passage.
- Multi-hop Fact Chain Mining: Using Wikidata to extract chains of related facts (e.g., Entity A → Relation → Entity B). These chains were then edited to create complex, counterfactual reasoning paths that test the model's ability to maintain the hierarchy across multiple logical steps.
- Parametric Probing: The researchers identified specific facts known to the base model and generated examples where the context explicitly contradicted those facts, forcing the model to choose between its "memory" and the "evidence."
Evaluation and Benchmarking
The HIERPREF-tuned models were evaluated against several rigorous benchmarks, including IfQA (focused on counterfactual presuppositions) and InstructMH-3k (a new benchmark for multi-hop reasoning where instructions conflict with context). They also utilized CounterMemoryMRQA, a curated subset of the MRQA dataset where context explicitly contradicts the model's internal parametric knowledge.
Key Results
The application of HIERPREF to the Mistral-v0.3-7B model yielded substantial performance gains. The fine-tuned model achieved an average improvement of over 18% across all benchmarks.
As shown in the results table, the HIERPREF-tuned model (Mistral-v0.3-7B w/ HIERPREF) significantly outperforms both the base model and standard instruction-tuned versions like Alpaca. Notably, the HIERPREF model achieves these results in a zero-shot setting, often surpassing the 5-shot performance of larger models. In the multi-hop InstructMH-3k task, the F1 score jumped from ~28% in the base model to 89.36%, rivaling proprietary models like GPT-4o.
Discussion and Limitations
The research highlights that data quality and targeted conflict resolution are more critical than sheer data volume. By training on a small but strategically designed dataset, the model's fundamental behavior regarding knowledge prioritization was altered.
However, the authors note several limitations. Prioritizing user instructions could potentially make models more vulnerable to "jailbreaking" if safety guardrails are framed as instructions to be ignored. Additionally, the current synthesis relies on specific prompt templates; future work is required to ensure robustness across diverse interaction styles.
Conclusion
Establishing a clear knowledge preference hierarchy is essential for the next generation of reliable AI assistants. HIERPREF provides a scalable method to ensure LLMs prioritize instructions and context over their own internal biases, paving the way for more accurate and controllable language models in RAG and personalized applications.
Summary updated