Introduction
Fine-tuning is the standard approach for specializing Large Language Models (LLMs) for specific domains. However, real-world instruction-tuning datasets—often scraped from chat logs or generated at scale—are notoriously "noisy," containing incorrect answers, vague prompts, or formatting errors. Because LLMs absorb patterns indiscriminately, training on this low-quality data leads to models that hallucinate or fail to follow instructions.
To address this, we present CLEAR (Confidence-based LLM Evaluation And Rectification), an automated pipeline designed to clean noisy datasets by leveraging a model's own confidence estimates to filter and correct flawed responses.
The CLEAR Pipeline
CLEAR is a two-stage, data-centric pipeline that treats data curation as an iterative process. Unlike many curation methods that rely on expensive manual labor or a "stronger" teacher model (like GPT-4), CLEAR allows a model to effectively bootstrap its own improvement.
1. Auto-Filter
Before fine-tuning, the system evaluates every (prompt, response) pair in the dataset using BSDetector. Instead of asking an LLM to provide a subjective quality score, it estimates confidence based on observed consistency (similarity across multiple outputs) and self-reflection (the model's own judgment of its correctness). Data with low confidence scores is discarded.
2. Auto-Correct
After an initial fine-tuning on the filtered data, the model becomes a domain specialist. CLEAR uses this specialized model to generate new candidate responses for the original noisy data. If the new response is judged "confidently better" than the original by the base model, the original is replaced, creating a virtuous cycle of improvement.
Key Insights: Confidence vs. Scoring
A pivotal finding of this research is that confidence is a far more precise signal for data quality than explicit scoring. As illustrated in Figure 4, an LLM might assign a high score (e.g., 4.0/5.0) to an incorrect response while simultaneously exhibiting extremely low confidence (e.g., 0.00075). By prioritizing confidence over simple scoring, CLEAR effectively identifies subtle errors that traditional methods miss.
Experimental Results
CLEAR was evaluated on noisy versions of three popular benchmarks: SQuAD-N (reading comprehension), Emails-N (categorization), and DROP-N (discrete reasoning).
- Accuracy Boosts: On SQuAD-N, GPT-3.5's accuracy jumped from 64.5% to 81.9% after CLEAR curation.
- Outperforming GPT-4: In several cases, smaller models fine-tuned with CLEAR outperformed GPT-4 using few-shot prompting. For example, on DROP-N, CLEAR-tuned GPT-3.5 reached 73.0% accuracy, while GPT-4 with three-shot prompting only managed 46.1%.
- Filtering Efficiency: The results suggest that for many noisy datasets, "less is more"—training on 50% high-quality data is significantly better than training on 100% noisy data.
Conclusion and Limitations
CLEAR demonstrates that models can successfully identify and rectify complex errors within their own training data. While highly effective, the iterative correction stage adds computational cost, and the process does not yet explicitly address inherent model biases. Future work will explore combining CLEAR with synthetic data generation to further enhance dataset robustness.
Summary updated