Aligning Large Language Models to Follow Instructions and Hallucinate Less via Effective Data Filtering

Shuzheng Si, Haozhe Zhao, Gang Chen, Cheng Gao, Yuzhuo Bai, Zhitong Wang, Kaikai An, Kangyang Luo, Chen Qian, Fanchao Qi, Baobao Chang, Maosong Sun · DOI

Introduction

Instruction tuning is a critical phase in transforming pre-trained Large Language Models (LLMs) into helpful assistants. However, this process often introduces a significant side effect: hallucinations. When a tuning dataset contains high-quality factual information that the model did not encounter during its pre-training phase, the model does not truly "learn" these new facts. Instead, it learns to provide an answer even when it is uncertain, effectively training the model to be overconfident and prone to "bullshitting."

Figure 1: Comparison of NOVA against RL-based and filtering-based methods, showing superior performance in balancing instruction following and hallucination reduction.

To address this, we introduce NOVA, a novel data-filtering framework designed to ensure that instruction-tuning data aligns with the model's pre-existing knowledge. By balancing "familiarity" (what the model already knows) with "quality" (how well the data is written), NOVA allows models to follow instructions reliably without adopting the dangerous habit of hallucinating unfamiliar facts.

The NOVA Framework

NOVA (Novel framework for identifying high-quality data that aligns with the LLM’s learned knowledge) employs a three-pronged approach to evaluate and select training samples.

Figure 2: The detailed framework of NOVA, illustrating the Sampling Stage, Filtering Metrics (ICP, SEI, and Quality Estimation), and the final data selection process.

1. Internal Consistency Probing (ICP)

To determine if a model is truly familiar with an instruction, NOVA prompts the model to generate multiple responses ($K=10$). It then analyzes the internal states—specifically the embeddings of the last token in the last layer. If the model is certain, these embeddings cluster tightly (low differential entropy). Scattered embeddings indicate the model is merely "guessing."

2. Semantic Equivalence Identification (SEI)

This component measures how well the model's internal knowledge matches the ground-truth response in the dataset. Using a Natural Language Inference (NLI) model, NOVA clusters generated responses by meaning. If the target response falls within the model's largest generated cluster, the model is deemed "familiar" with that specific answer.

3. Expert-Aligned Quality Reward Model

Familiarity alone is insufficient for effective instruction following. NOVA utilizes a reward model trained on expert-labeled preference data to score the complexity and fluency of instructions and responses. The final selection uses a Mixed Rank to identify the top percentage of data that is both high-quality and familiar to the model.

Experimental Results

NOVA was evaluated using the Alpaca and Alpaca-GPT4 datasets across several benchmarks, including BioGEN, LongFact, and MT-Bench.

Hallucination Reduction and Factuality

On the BioGEN benchmark, NOVA improved factuality scores by 3.5% to 8.6% compared to vanilla instruction tuning. Similar gains of 2.0% to 5.1% were observed on LongFact. Crucially, NOVA outperformed computationally expensive RL-based methods like FLAME-DPO without requiring additional preference data.

Instruction Following Efficiency

Despite using only 5% of the original data, NOVA significantly improved instruction-following capabilities. On the Alpaca dataset, NOVA achieved an MT-Bench score of 60.5, a substantial increase from the vanilla baseline of 51.9. This demonstrates that high-quality, familiar data is far more effective than a larger volume of unfamiliar data.

Discussion and Limitations

NOVA confirms that forcing models to learn "expert-level" facts missing from their pre-training is a primary driver of hallucinations. By selecting data the model already "knows," NOVA mitigates overconfidence; models trained this way show higher perplexity on samples they are likely to get wrong, suggesting they "know what they don't know."

However, the framework does involve computational overhead during the filtering phase, as it requires generating multiple responses for every potential training sample. Additionally, the current implementation focuses on single-turn instructions and relies on the accuracy of off-the-shelf NLI models for semantic clustering. Future work will explore multi-turn scenarios and further refine the internal state probing techniques.

Summary updated

BibTeX
@inproceedings{si2025aligning,
  author = {Shuzheng Si and Haozhe Zhao and Gang Chen and Cheng Gao and Yuzhuo Bai and Zhitong Wang and Kaikai An and Kangyang Luo and Chen Qian and Fanchao Qi and Baobao Chang and Maosong Sun},
  title = {{Aligning Large Language Models to Follow Instructions and Hallucinate Less via Effective Data Filtering}},
  booktitle = {Annual Meeting of the Association for Computational Linguistics},
  year = {2025},
}
Figure