From Misleading Queries to Accurate Answers: A Three-Stage Fine-Tuning Method for LLMs

Guocong Li, Weize Liu, Yihang Wu, Ping Wang, Shuaihan Huang, Hongxia Xu, Jian Wu

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. To evaluate our method, we conducted experiments on three datasets for the hallucination detection task and the question answering (QA) task, as well as two datasets containing misleading information that we constructed. The experimental results demonstrate that our method significantly improves the accuracy and factuality of LLM responses, while also enhancing the ability to detect hallucinations and reducing the generation of hallucinations in the output, particularly when the query contains misleading information.

Introduction

Large Language Models (LLMs) are notoriously sensitive to the quality of their input. When a user provides a query containing subtle factual errors or misleading context (e.g., "Why is Zhengzhou the capital of Shandong?"), the model often accepts the false premise and generates a hallucinated response. While existing research focuses on "self-correction" (fixing the output after it's generated) or Retrieval-Augmented Generation (RAG), these methods often overlook the root cause: the model's inability to challenge the input itself. This paper addresses the "gullibility" of LLMs, particularly in knowledge-intensive fields like medicine or law, where misleading inputs can lead to dangerous or incorrect advice.

Methodology

We propose a Three-Stage Fine-Tuning Method that transforms the model's reasoning process into a modular pipeline:

  1. Query Detection Training: The model is trained to act as a "mistake detector," outputting a simple "YES" or "NO" to indicate if a query contains misleading information based on its internal or provided external knowledge.
  2. Query Correction Training: For queries flagged as "YES," the model is trained to rewrite the query into a factually accurate version. Instead of using simple text-matching (edit distance), semantic similarity loss (via Sentence-BERT) is employed to ensure the corrected query is logically and factually sound.
  3. Query Answering Training: Finally, the model is trained to generate accurate answers based on the corrected queries.
The proposed three-stage fine-tuning pipeline: Detection, Repair, and Answering.

Experimental Setup

The method was evaluated using several standard and custom-built datasets:

  • Standard Benchmarks: HaluEval (for hallucination detection), CQA (Commonsense QA), and TruthfulQA.
  • Newly Constructed "Misleading" Datasets: Using Qwen2.5-72B, we created HaluEval-QAmis and CQAmis. These datasets consist of original questions modified to include subtle, deceptive errors.
  • Filtering Criteria: To ensure high quality, we only kept misleading queries that had high surface similarity to the original but caused the base model to fail (measured by an "Answer Error Rate").

Results and Discussion

The three-stage method consistently outperformed both the "Original" base models and standard Supervised Fine-Tuning (SFT). On the misleading HaluEval-QAmis dataset, Qwen2-7B improved from 51.1% to 68.0%. Similarly, on the CQAmis dataset, Llama3-8B improved from 64.9% to 70.0%, significantly narrowing the performance gap between "clean" and "misleading" queries.

Performance comparison on HaluEval benchmarks across different instruction models.

Analysis of standard benchmarks revealed a "dirty" data problem: 14.62% of HaluEval-Dialogue and 10.40% of CQA contain misleading queries. By correcting these inputs, our method avoids cascading errors. The benefits also extended to instruction following, reducing failure rates in smaller models like Llama-3.2-3B. Notably, the "detect-correct" behavior proved to be a transferable skill, showing improvements even on tasks outside the specific training subset.

Conclusion

While the system's effectiveness is dependent on the model's underlying knowledge base, the results demonstrate that a "detect-correct-answer" workflow is a robust and transferable skill for LLMs. Future work will explore the scalability of this method to ultra-large models (70B+) and its application to more diverse domains such as creative writing or complex coding.

Summary updated

BibTeX
@inproceedings{li2025from,
  author = {Guocong Li and Weize Liu and Yihang Wu and Ping Wang and Shuaihan Huang and Hongxia Xu and Jian Wu},
  title = {{From Misleading Queries to Accurate Answers: A Three-Stage Fine-Tuning Method for LLMs}},
  booktitle = {Annual Meeting of the Association for Computational Linguistics},
  year = {2025},
  url = {https://openreview.net/forum?id=gznFF1VpxN},
}
Figure