Abstract
Large language models (LLMs) possess remarkable language understanding and generation capabilities, yet they are prone to "hallucinations"—generating factually incorrect or misleading information. This paper addresses this reliability gap by introducing the Learn to Refuse (L2R) framework. L2R mitigates hallucinations in question-answering tasks by implementing a dual-stage refusal mechanism and a decoupled, structured knowledge base. By treating the LLM as a reasoning engine rather than a database, the system can recognize its knowledge boundaries and abstain from answering when evidence is insufficient. Our results demonstrate that L2R significantly enhances the controllability and accuracy of LLMs across general and specialized domains.
Introduction: The Challenge of Hallucination
Despite their utility, standard LLMs are designed to be helpful, often leading them to attempt answers even when they lack the necessary information. These fact-conflicting hallucinations occur when a model's internal weights contain incomplete or outdated knowledge. While Retrieval-Augmented Generation (RAG) provides external context, models still struggle to identify the limits of that context. The core objective of this research is to provide LLMs with a formal mechanism to say "I don't know," thereby increasing the trustworthiness of their outputs.
The Learn to Refuse (L2R) Framework
The L2R framework shifts the paradigm from relying on an LLM's internal knowledge to utilizing a traceable, external source. The system is built upon three primary pillars:
- Knowledge Scope Limitation: The LLM is treated as a "zero-knowledge" processor. It is restricted to answering questions solely based on an independent, structured Knowledge Base (KB) that can be progressively expanded and validated.
- Automatic Knowledge Enrichment (AKE): To populate the KB efficiently, L2R employs a multi-agent pipeline. A Question Generation Agent creates seed queries, an Answer Generation Agent provides responses with confidence scores, and a QA-to-Knowledge Agent distills high-confidence pairs into clean, declarative facts.
- Dual Refusal Mechanism: Reliability is enforced through two layers of filtering. Soft Refusal involves the LLM judging its own ability to answer based on retrieved context. Hard Refusal acts as a system-level safety net, calculating semantic similarity between the query and retrieved knowledge; if the score falls below a defined threshold, a refusal is triggered automatically.
Experimental Evaluation and Results
We evaluated the L2R framework across several rigorous benchmarks, including TruthfulQA (measuring mimicry of human falsehoods), CommonsenseQA, and MedQA (specialized medical knowledge).
As shown in the results, L2R-GPT achieved a substantial accuracy of 65.1% on TruthfulQA-MC1, a significant improvement over the base GPT-3.5 (46.6%) and standard RAG (53.7%). This performance boost is directly attributed to the model's ability to refuse approximately 20% of the questions where it lacked sufficient evidence. Similar improvements were observed in the medical domain (MedQA), where accuracy rose from 51.2% to 52.8% upon integrating a structured medical corpus.
Key Insights and Discussion
- Decoupling Reasoning from Knowledge: By isolating the reasoning engine from the data source, L2R provides full traceability. Every answer can be linked back to a specific entry in the KB, making the system's logic transparent.
- The Necessity of Hard Refusal: Ablation studies confirmed that LLMs often overestimate their own knowledge. The mathematical "hard refusal" threshold is essential to prevent the model from attempting to answer when retrieved data is irrelevant.
- Accuracy-Coverage Trade-off: L2R highlights a fundamental trade-off in AI reliability: by refusing to answer difficult or uncertain questions, the total count of answered questions decreases, but the precision of the remaining answers increases dramatically.
Conclusion and Future Work
The Learn to Refuse framework represents a significant step toward more controllable and reliable AI. While currently optimized for "one-hop" factual questions, future work will focus on scaling the system to million-scale knowledge bases and adapting the refusal philosophy to more complex reasoning tasks and creative writing domains where "correctness" is less binary. By teaching models when to remain silent, we can ensure that when they do speak, they are correct.
Summary updated