Share your thoughts, 1 month free Claude Pro on usSee more
WorkDL logo mark

RAGognizer: Hallucination-Aware Fine-Tuning via Detection Head Integration

About

Retrieval-Augmented Generation (RAG) is widely used to augment the input to Large Language Models (LLMs) with external information, such as recent or domain-specific knowledge. Nonetheless, current models still produce closed-domain hallucinations and generate content that is unsupported by the retrieved context. Current detection approaches typically treat hallucination as a post-hoc problem, relying on black-box consistency checks or probes over frozen internal representations. In this work, we demonstrate that hallucination detection based on internal state representation can also serve as a direct training signal. We introduce RAGognize, a dataset of naturally occurring closed-domain hallucinations with token-level annotations, and RAGognizer, a hallucination-aware fine-tuning approach that integrates a lightweight detection head into an LLM, allowing for the joint optimization of language modeling and hallucination detection. This joint objective forces the model to improve the separability of its internal states regarding hallucinations while simultaneously learning to generate well-formed and meaningful responses. Across multiple benchmarks, RAGognizer achieves state-of-the-art token-level hallucination detection while substantially reducing hallucination rates during generation, without degrading language quality or relevance.

Fabian Ridder, Laurin Lessel, Malte Schilling• 2026

Related benchmarks

TaskDatasetResultRank
Hallucination DetectionHaluEvalQA
ROC-AUC0.9038
39
Response-level Hallucination DetectionRAGognize
AUROC94.91
13
Response-level Hallucination DetectionRAGTruth QA
AUROC87.43
13
Response-level Hallucination DetectionHDM-Bench
AUROC72.72
11
Token-level hallucination detectionRAGognize
AUROC93.33
7
Token-level hallucination detectionRAGTruth QA
AUROC90.25
7
Token-level hallucination detectionHDM-Bench
AUROC77.03
5
Showing 7 of 7 rows

Other info

Follow for update