Abstract
Large language models (LLMs) exhibit excellent performance in natural language processing (NLP), but remain highly sensitive to the quality of input queries, especially when these queries contain misleading or inaccurate information. Existing methods focus on correcting the output, but they often overlook the potential of improving the ability of LLMs to detect and correct misleading content in the input itself. In this paper, we propose a novel three-stage fine-tuning method that enhances the ability of LLMs to detect and correct misleading information in the input, further improving response accuracy and reducing hallucinations. Specifically, the three stages include (1) training LLMs to identify misleading information, (2) training LLMs to correct the misleading information using built-in or external knowledge, and (3) training LLMs to generate accurate answers based on the corrected queries. The experimental results demonstrate that our method significantly improves the accuracy and factuality of LLM responses, particularly when the query contains misleading information.
Introduction
Large Language Models (LLMs) are notoriously sensitive to the quality of their input. If a user provides a query with a false premise—for example, "Why is Zhengzhou the capital of Shandong Province?" (it is actually the capital of Henan)—many models will simply hallucinate a plausible-sounding but entirely incorrect explanation to satisfy the prompt. While existing research often focuses on "self-correction" or retrieval-augmented generation (RAG), these methods often overlook the root cause: the misleading content in the input itself. This "garbage in, garbage out" problem is particularly dangerous in high-stakes fields where queries might be imprecise or contain subtle factual errors.
Methodology
We propose a novel Three-Stage Fine-Tuning Method that transforms the model into a proactive fact-checker of its own prompts. This sequential pipeline ensures the model validates the input before attempting a response.
- Query Detection Training: The model is trained to identify whether a query contains misleading information (a binary classification task).
- Query Correction Training: If a query is flagged as misleading, the model is trained to "repair" it using its internal knowledge or provided context. To ensure logical and factual consistency, we utilize semantic similarity loss (via Sentence-BERT) rather than simple word-matching.
- Query Answering Training: Finally, the model is trained to generate an accurate response based on the corrected query.
Experimental Setup
The method was evaluated on several standard benchmarks and two newly constructed adversarial datasets:
- Standard Benchmarks: HaluEval (QA, Summarization, and Dialogue subsets), CQA (Commonsense QA), and TruthfulQA.
- Adversarial Datasets: We created $HaluEval-QA_{mis}$ and $CQA_{mis}$ by using Qwen2.5-72B to inject subtle, high-quality errors into original queries. These errors were filtered to ensure they were deceptive enough to trick standard LLMs while remaining factually incorrect.
Results and Discussion
The three-stage method consistently outperformed both original models and standard Supervised Fine-Tuning (SFT) across various model families, including Qwen and Llama.
Key Insights
- Input Correction Efficacy: Addressing the "poisoned well" of a misleading query is more effective than attempting to fix a hallucinated response post-generation.
- Hidden Errors in Benchmarks: Analysis revealed that standard datasets contain significant misleading information (~14.6% of HaluEval-Dialogue and ~10.4% of CQA). Cleaning these inputs improved baseline performance.
- Cross-Task Generalization: The fact-checking ability generalized from QA to tasks like summarization and dialogue, suggesting the model learned a general behavior of skepticism.
- Instruction Following: By reducing input noise, the model became more stable and less likely to produce responses that failed to follow requested formats.
Conclusion and Future Work
While the three-stage method significantly reduces hallucinations, it remains dependent on the model's internal knowledge or provided context. If the model lacks the necessary facts to correct a query, it may still fail. Future research will explore scaling this method to ultra-large models (70B+) and expanding training to specialized domains like medicine or law to handle highly technical misleading queries.
Summary updated