MedHal: An Evaluation Dataset for Medical Hallucination Detection Gaya Mehenni, Amal Zouaq Abstract We present MedHal, a novel large-scale dataset specifically designed to evaluate if models can detect hallucinations in medical texts. Current hallucination detection methods face significant limitations when applied to specialized domains like medicine, where they can have disastrous consequences. Existing medical datasets are either too small, containing only a few hundred samples, or focus on a single task like Question Answering or Natural Language Inference. MedHal addresses these gaps by: (1) incorporating diverse medical text sources and tasks; (2) providing a substantial volume of annotated samples suitable for training medical hallucination detection models; and (3) including explanations for factual inconsistencies to guide model learning. We demonstrate MedHal’s utility by training and evaluating a baseline medical hallucination detection model, showing improvements over general-purpose hallucination detection approaches. This resource enables more efficient evaluation of medical text generation systems while reducing reliance on costly expert review, potentially accelerating the development of medical AI research. 1 Introduction Despite significant advancements in the field of Natural Language Processing, Large Language Models (LLMs) are prone to generating hallucinations ( Huang et al. 2025 ). This tendency poses a substantial obstacle to their application in multiple domains like medicine. While a robust hallucination detection is crucial, current hallucination metrics suffer from limitations in accuracy ( Lin 2004 ; Banerjee & Lavie 2005 ; Zhang et al. 2019 ). Traditional approaches relying on n-gram overlap ( Lin 2004 ) or entity overlap ( Adams et al. 2024 ) fail to capture the nuances of factual correctness. While more recent methods leverage general-purpose neural models ( Kim et al. 2024 ; Laban et al. 2021 ), incorporating context for potentially improved efficiency and have shown to correlate better with human judgment than n-gram overlap metrics ( Zheng et al. 2023 ), these models still exhibit suboptimal evaluation performance when applied to more specialized domain. Indeed, these models are mainly trained to detect general inconsistencies such as factual hallucinations or reasoning fallacies. In contexts like medical text generation, the most efficient way to detect hallucinated content is still to review generations by medical experts ( Searle et al. 2023 ; Hegselmann et al. 2024 ). However, this approach is costly and time-consuming, placing a significant burden on medical professionals. Therefore, a dedicated medical hallucination evaluation dataset is highly desirable. Such a resource could not only provide an accurate and relevant assessment of medical text generation, but also significantly reduce the cost and effort associated with medical AI research, facilitating its wider adoption. Current medical datasets often focus on single tasks like Question Answering (QA) or Natural Language Inference (NLI) to evaluate the hallucination levels of LLMs, limiting their scope and applicability to diverse medical text generation scenarios ( Romanov & Shivade ; Pal et al. 2023 ; Chen et al. 2024 ; Yan et al. 2024 ; Agarwal et al. 2024 ; Hegselmann et al. 2024 ). Furthermore, well-crafted medical hallucination datasets that currently exist only contain a few hundred samples, making them unsuitable for training large language models (LLMs) ( Hegselmann et al. 2024 ). 2 Related Work Current state-of-the-art hallucination detection in the medical domain faces significant challenges due to the scarcity of comprehensive and diverse datasets. Existing hallucination datasets often focus on specific tasks or are limited in size. For instance, Med-Hallmark ( Chen et al. 2024 ) and Med-HVL ( Yan et al. 2024 ) focus on visual question-answering, assessing the ability of models to answer questions about medical images. MedHALU ( Agarwal et al. 2024 ) and Med-Halt ( Pal et al. 2023 ), on the other hand, are centered around QA and focus on evaluating LLMs’ ability to answer complex medical questions and detect inconsistencies in their responses. While the Hallucinations-MIMIC-DI dataset ( Hegselmann et al. 2024 ) provides a comprehensive annotation of discharge summaries and BHC sections, it only contains 100 samples, which is not sufficient to train a model or effectively evaluate another. Finally, some large datasets datasets like MedNLI exist for NLI tasks ( Romanov & Shivade ). However, as shown in Figure 1 , they rely on short, single-sentence premises and hypotheses, limiting their ability to capture complex medical reasoning and hallucinations. Premise: Labs were notable for Cr 1.7 (baseline 0.5 per old records) and lactate 2.4. Hypothesis: Patient has normal Cr Figure 1: Sample from MedNLI Our work differs from traditional hallucination medical datasets in several key aspects: 1. We utilize a greater variety of sources, such as clinical notes, clinical trials and medical questions, for the evaluation of hallucinations in more complex contexts 2. We create a large scale dataset that can be used to train a medical evaluator that can efficiently detect hallucinated content 3. We aim to provide explanations for why a statement is factual or not, a guiding signal that can be useful for LLM fine-tuning 3 Methodology This study introduces MedHal, a novel dataset and benchmark designed for the evaluation of medical hallucination detection models. MedHal encompasses a diverse corpus of medical text, including clinical notes, research articles, and patient communication, annotated with various instances of factual inconsistencies and medical hallucinations. These hallucinations are generated through a suite of strategies tailored to individual task modalities, including answer substitution in question-answering (QA) and the introduction of conflicting statements in natural language inference (NLI). The efficacy of MedHal is demonstrated through the training of a baseline model and the comparative analysis of its performance against state-of-the-art models on the proposed benchmark. This resource aims to facilitate the development of more accurate and robust medical language models by providing a standardized and clinically relevant evaluation platform. Subsequent sections detail the construction of MedHal, describe the associated benchmark, and present experimental results demonstrating its utility in evaluating medical hallucination detection models. The methodological approach involves the transformation of existing medical datasets across diverse tasks (QA, Summarization, NLI, Information Extraction) into a unified hallucination detection task. This is achieved by framing the task as the binary classification of a given statement as factual or non-factual, potentially conditioned on a provided context. 3.1 Unified Task Formulation To construct the dataset, a unified task formulation was established. Drawing inspiration from the NLI paradigm, each sample in the dataset is composed of a statement (analogous to the NLI hypothesis). This statement is classified as either factual or non-factual. The statement may be presented in the context of specific medical information (e.g., ”This patient has suffered from a myocardial infarction”) or as a general assertion within the medical domain (e.g., ”Aging causes an increase in blood pressure”). For each statement, the dataset provides a binary label indicating its factuality and, in the case of non-factual statements, an explanation detailing the specific inconsistency. A statement is defined as factual if all information contained within it is verifiable through the provided context or by established medical knowledge. Each sample in MedHal is structured as follows: • Statement: A proposition to be classified as factual or non-factual. • Context (optional): Contextual information relevant to the statement. • Factual (Binary): A binary label indicating the factuality of the statement (Yes/No). • Explanation: A textual explanation of the inconsistency for non-factual statements. Table 1 shows examples of how statements are generated from samples.The following sections detail the generation of samples for this unified task, based on datasets from question-answering, information extraction, NLI, and summarization tasks. Task Datasets Sample Generated Statement Information Extraction Augmented-Clinical Notes A 10-year-old girl first noted a swollen left knee and underwent repeated arthrocentesis. She underwent arthroscopic surgery and was diagnosed with … \rightarrow age: 10 years old The patient is 10 years old. Summarization SumPubMed the large genotyping studies in the last decade have revolutionize genetic studies. our current ability to … \rightarrow genetic admixture is a common caveat for genetic association analysis. these results… genetic admixture is a common caveat for genetic association analysis. these results… NLI MedNLI Labs were notable for Cr 1.7 (baseline 0.5 per old records) and lactate 2.4. \rightarrow Patient has normal Cr Patient has normal Cr QA MedQA, MedMCQA Which of the following medications is most commonly used as first-line treatment for newly diagnosed type 2 diabetes mellitus in patients without contraindications? \rightarrow Metformin Metformin is most commonly used as first-line treatment for newly diagnosed type 2 diabetes mellitus in patients without contraindications. Table 1: Example of samples are used to generate statements for each task 3.2 Question Answering Dataset Transformation Question-answering (QA) datasets are structured around the presentation of a query followed by a set of potential responses, including binary (yes/no/maybe) and multiple-choice (A, B, C, …) formats. To generate factual samples from QA datasets, the question and its corresponding correct answer are transformed into a declarative statement using a large language model. Conversely, hallucinated samples are produced by pairing the question with incorrect answer options and subsequently converting these combinations into statements via the same LLM. Table 2 shows an example of a multiple-choice question converted into a statement. For generation, a consistent prompt template is employed for both factual and hallucinated sample generation. The prompt is given in Appendix 3 . One-shot prompting is utilized to guide the LLM in accurately converting question-answer pairs into coherent statements. As for the explanation, certain QA datasets provide an explanation of why an answer is false. In these cases, we use the provided explanation for the non-factual statement. In other cases, we simply use the statement of the factual sample as the explanation. Sample Type Question Answer Generated Statement Factual Which of the following medications is most commonly used as first-line treatment for newly diagnosed type 2 diabetes mellitus in patients without contraindications? Metformin Metformin is most commonly used as first-line treatment for newly diagnosed type 2 diabetes mellitus in patients without contraindications. Non-Factual Insulin Insulin is most commonly used as first-line treatment for newly diagnosed type 2 diabetes mellitus in patients without contraindications. Table 2: Example of Question-Answering Dataset Transformation 3.3 Information Extraction Dataset Transformation Information extraction (IE) datasets comprise, for each source document (e.g., clinical notes, clinical trials), a set of extracted text sequences related to specific concepts within that document. These extracted sequences, or ”extractions,” represent information pertaining to a particular attribute of the document. For example, from a clinical note, an extraction might represent the patient’s reason for the visit. To generate factual samples, the source document is used as the context, and the corresponding extraction is treated as the statement. Non-factual samples are generated by randomly interchanging extractions of the same value type between different documents (e.g., medications are swapped between patient records). When extractions are structured as key-value pairs, a large language model (LLM) is employed to transform these pairs into declarative statements. For instance, the key-value pair ”visit motivation: Lower back pain” is converted into the statement ”The patient’s visit motivation is lower back pain” . This transformation is performed using the prompt template shown in the Appendix 4 within a one-shot prompting framework. The explanation for a non-factual statement is provided by the factual extraction associated with the same document and key concept. An example of how a sample from an information extraction dataset is transformed is shown in Table 3 . In cases where extractions are related to attributes with limited value diversity, such as sex, we ensure distinct values by explicitly switching them if random swapping results in identical values. The source documents are used without any preprocessing. Sample Type Source Document Extraction Statement Explanation Factual A 10-year-old girl first noted a swollen left knee and underwent repeated arthrocentesis… age: 10 years old The patient is 10 years old - Non-Factual A 10-year-old girl first noted a swollen left knee and underwent repeated arthrocentesis… age: 16 years old The patient is 16 years old The patient is 10 years old Table 3: Example of Information Extraction Dataset Transformation (the extraction from the non-factual statement is taken from another original sample) 3.4 Natural Language Inference Dataset Transformation Given the inherent similarity between the proposed task and natural language inference (NLI), NLI datasets are directly adaptable to the MedHal benchmark. We utilize NLI datasets specifically related to the medical domain. Factual samples are derived from hypotheses in entailment examples, while hallucinated samples are generated from hypotheses in contradiction examples. The premise component of the NLI example serves as the context for the corresponding statement. Samples resulting in a neutral label are ignored during dataset construction. The NLI datasets are not preprocessed beyond this filtering. Note that in this case, we do not have explanations for the non-factual samples. 3.5 Summarization Dataset Transformation For summarization datasets, factual samples are constructed using genuine summaries or sentences extracted from them. Hallucinated samples are generated by extracting a single sentence from the original summary and employing an LLM to modify it, introducing self-contradictory information. The modified, hallucinated sentence is then reintegrated into the summary at its original position. The source text intended for summarization serves as the context, and the summary itself is treated as the statement. The explanation for a non-factual statement is simply the original sentence used to generate the hallucinated version. Sentences for hallucination generation are selected randomly, with a minimum length of 100 characters to ensure sufficient contextual information for the LLM. An example of how a sample is generated is shown in Table 4 . The prompt used to generate self-contradictory sentences is shown in Appendix 5 .The goal of this process is to evaluate if models can effectively detect small mistakes in statements consisting of long sequences of text. Sample Type Source Document Summary Statement Explanation Factual a central feature in the maturation of hearing is a transition in the electrical signature of cochlear hair cells from spontaneous calcium… cochlear hair cells are high-frequency sensory receptors… cochlear hair cells are high-frequency sensory receptors… - Non-Factual cochlear hair cells are low-frequency sensory receptors… According to the source document, cochlear hair cells are high-frequency sensory receptors… Table 4: Example of Summarization Dataset Transformation 3.6 Dataset Description To ensure a balanced benchmark, each factual sample is paired with a corresponding non-factual sample. Furthermore, the benchmark is constructed using a diverse set of datasets, encompassing all task modalities previously described, to ensure variability in document sources. Table 5 presents a comprehensive overview of the datasets utilized in the generation of this benchmark. Dataset Task S Content Type Source # Samples # Gen MedMCQA QA ✗ Medical Content Pal et al. 2022 183,000 70,730 MedNLI NLI ✗ Clinical Notes Herlihy & Rudinger 2021 11,232 7,488 ACM IE ✓ Clinical Notes Bonnet & Boulenger 2024 22,000 73,040 MedQA QA ✗ Medical Content Jin et al. 2020 12,723 18,906 PubMedSum Sum ✗ Clinical Trials Gupta et al. 2021 33,772 178,657 Table 5: Description of datasets used to generate the MedHal benchmark (S is for Synthetic) The discrepancy between the original sample count and the generated sample count is attributable to several factors. Firstly, for certain tasks like information extraction, original samples can yield multiple generated samples. Secondly, to manage computational resource limitations, the total number of generated samples was reduced. Finally, samples resulting in token sequences longer than 8192 were excluded to mitigate potential adverse effects on model training. Preprocessing was selectively applied to specific datasets. For the ACM dataset, only valid JSON-structured extractions were retained. For QA datasets, explanations containing phrases such as ”Answer is c)” that referred to the original dataset options were removed using regular expressions, as we are using these samples outside the QA setting. For instance, the explanation ”Answer is c), Metformin is most commonly used as a first-line treatement, because…)” would be transformed to ”Metformin is most commonly used as a first-line treatement, because…)” . The MedHal benchmark is partitioned into training, validation, and test sets according to an 80/10/10 ratio, ensuring a consistent evaluation framework. This results in 313,920 samples for the training set, 17458 samples in the validation set and 17443 samples in the test set. 4 Experiments 4.1 Models For the generation of the MedHal dataset, we utilize the Llama-3-70B model ( Grattafiori et al. 2024 ), a state-of-the-art language model known for its strong performance across various language generation tasks. For all prompting strategies employed in the sample generation process, a one-shot learning approach was adopted to provide the model with examples of the desired output format prior to generation. Importantly, to ensure a fair evaluation of our proposed benchmark, the dataset generation was performed exclusively using the training splits of the individual source datasets. This approach allows for the independent evaluation of our trained models on the original test sets of the constituent datasets. 4.2 Evaluator To demonstrate the utility of the MedHal dataset, we fine-tuned a dedicated model for the detection of medical hallucinated content. This evaluator model is initialized with the Llama-1B model ( Grattafiori et al. 2024 ) and subsequently fine-tuned on the training set of the MedHal dataset. The detailed training configuration is provided in Appendix 7 . The selection of a 1 billion parameter model as the base for our evaluator is motivated by the desire to provide a resource that is accessible to a wider range of researchers and domain experts, including those with limited computational resources. Existing evaluator models and general-purpose language models often comprise several billion parameters, necessitating significant infrastructure for their deployment. This can restrict the practical application of LLM-based evaluation metrics in certain research contexts. Furthermore, the use of a smaller model contributes to lower infrastructure costs associated with training and deployment. Future work will explore the potential for enhancing the evaluation metrics through the utilization of larger models or the optimization of the fine-tuning process. 4.3 Results We also fine-tuned a general-purpose Llama-3 1B parameter model (MedHal-Llama-1B) on the dataset. This serves as a baseline to evaluate whether specialized medical LLMs, which have undergone extensive medical domain fine-tuning, already demonstrate strong performance in detecting hallucinated content and can effectively function as judges in medical hallucination detection tasks. The prompt used for all non fine-tuned models is shown in Appendix 6 . We report two types of metrics: factuality metrics and explanation metrics. Factuality metrics aim to measure if the model correctly detected hallucinated content. These include the precision, recall, and F1-score. Explanation metrics aim to evaluate if explanations generated by models when statements are not factual are valid. They evaluate if models, when detecting hallucinated content, correctly identify which part of the statement is hallucinated. In order to compute these metrics, we only take into account samples where both the prediction and the ground truth indicate a non-factual statements since in other cases, a true explanation might not exist or not be generated. Explanation metrics include the ROUGE-1 (R1) and ROUGE-2 (R2) ( Lin 2004 ) scores and the BLEU ( Papineni et al. 2002 ) score. Results are shown in Table 6 . FT Type Models Factuality Explanation P R F1 BLEU R1 R2 ✗ General Llama-1B-Instruct 0.53 0.32 0.40 0.01 0.13 0.03 Llama-8B-Instruct 0.59 0.62 0.60 0.05 0.24 0.14 Medical BioMistral-7B 0.56 0.43 0.49 0.03 0.22 0.11 MedLlama-8B 0.52 0.59 0.55 0.03 0.21 0.08 OpenBioLLM-8B 0.52 0.77 0.62 0.04 0.21 0.10 ✓ General MedHal-Llama (Ours) 0.75 0.77 0.76 0.45 0.70 0.59 Table 6: Results of models on test set of MedHal (FT: Fine-Tuned, P: Precision, R: Recall, F1: F1-Score, R1: ROUGE-1, R2: ROUGE-2) As models do not always follow the output format given in the prompt in Appendix 6 , we only compute the factuality metrics on samples that matched the output format. We also compute the F1-score of each model, based on the origin of each sample to see if models tend to excel in certain tasks compared to other tasks. These results are shown in Figure 2 . Figure 2: Accuracy of models based on each dataset source 5 Discussion 5.1 Overall Model Performance Our evaluation reveals several key insights regarding the performance of various models in detecting and explaining medical hallucinations. Notably, general-purpose models demonstrated a surprising aptitude for identifying factual inaccuracies, with Llama-8B-Instruct achieving the highest precision (0.59) in models that were not fine-tuned. However, part of this performance might also be due to the memorization of samples available in our dataset as it is built from datasets training sets. We base this hypothesis on the observation that this model significantly outperformed others by a wide margin on MedNLI, the only dataset that had not been transformed by another LLM. In contrast, specialized medical models, despite extensive fine-tuning on medical texts, exhibited lower performance in factuality metrics. Only OpenBioLLM demonstrated higher overall performance with an F1-score of 0.62. However, it exhibited a higher recall than precision, indicating a tendency towards overconfidence in identifying factual statements. Interestingly, general-purpose models also outperformed medical models in generating explanations for identified hallucinations, as evidenced by higher BLEU and ROUGE scores. After manual evaluation, this is also mainly due to medical models not generally following instructions to explain their choices. 5.2 Task-Specific Performance Variations Performance varied across different tasks, highlighting the challenges associated with specific data sources. Notably, information extraction proved challenging for all models, including our fine-tuned MedHal-Llama-1B, which performed only slightly better than random chance. We hypothesize that this might be attributable to the synthetic nature of the information extraction dataset, which might introduce some inaccuracies in our labels. Furthermore, we observed no significant performance disparity between tasks that require contextual analysis (information extraction, summarization, NLI) and tasks that operate on isolated statements (question-answering). This suggests that the presence or absence of contextual information does not substantially impact the models’ ability to detect and explain hallucinations. 5.3 Fine-Tuned Evaluation Model Fine-tuning a 1 billion parameter Llama model (MedHal-Llama) on our dataset yielded impressive results, surpassing the performance of models seven to eight times its size, including those with extensive medical fine-tuning. This finding might indicate that specialized medical fine-tuning does not guarantee a higher performance in hallucination detection, at least as measured by our dataset. MedHal-Llama especially demonstrated high performance in detecting hallucinations within the summarization task in both factuality and explanation metrics. This is likely due to the overrepresentation of summarization samples in our dataset, leading the model to correctly identifying which sentences were falsified. Future research should however focus on balancing the dataset across all tasks to ensure a more equitable evaluation. 6 Limitations and Future Work It is important to acknowledge some limitations of our methodology, the main one being that we rely on generated content. The validity of the generated hallucinated content was primarily assessed through visual inspection of a sample of the generated data and relied on the performance of a 70 billion model at not hallucinating over small sequences of texts. Indeed, all generations only involved generating a small number of tokens for the model. However, ideally, a comprehensive evaluation involving medical professionals would be conducted to validate the accuracy and clinical relevance of the generated dataset. Additionally, while we only fine-tune a general purpose model, future work should also evaluate the performance of fine-tuning medical models to this task to see how they compare to our current fine-tuned model that is based on a general purpose model. 7 Conclusion In this study, we introduced MedHal, the first large-scale dataset designed to specifically address the challenge of hallucination detection across diverse clinical tasks, including summarization, natural language inference, information extraction, and question answering. We evaluated a range of medical and general-purpose models on this dataset, providing a comprehensive benchmark for assessing their performance in this critical domain. Furthermore, we fine-tuned an evaluator model on MedHal, which we make available to the community as a baseline and tool for future research. While MedHal represents a significant step forward in addressing the limitations of existing hallucination detection methods in the medical field, we acknowledge the need for further refinement. Specifically, future work should prioritize validating the accuracy and clinical relevance of labels and explanations through expert reviews. Additionally, it should also focus on balancing the dataset across all included tasks to ensure a more equitable evaluation. By addressing these limitations, we can enhance the reliability and utility of MedHal. 8