Papers › Med-HEAL: Analyzing and Mitigating Hallucinations in Medical LLMs with...

Med-HEAL: Analyzing and Mitigating Hallucinations in Medical LLMs with Hallucination-Aware In-Context Learning

31 May 2026arXiv:2606.01301added by Syntology

Yiming Liao, Zeno Franco, Jose Eduardo Lizarraga Mazaba, Keke Chen

Title, abstract, authors and date from arXiv's metadata (CC0); this paper is not in the Papers with Code archive (frozen 2025-07-28).

Hallucinations in medical large language models (LLMs) pose serious risks for clinical decision support, particularly when models must reason over complex electronic health records (EHRs). However, existing benchmarks often lack a realistic clinical context and provide limited insight into how hallucinations can be mitigated in practice. We introduce Med-HEAL, a framework for systematically identifying, analyzing, and mitigating hallucinations in medical LLMs using clinically grounded data. Building on the EHRNoteQA benchmark derived from MIMIC-IV discharge summaries, we construct a hallucination dataset by evaluating BioMistral-7B on open-ended clinical question answering tasks. Model outputs are labeled through a dual evaluation pipeline that combines LLM-as-a-Judge assessment (GPT-4o) with human auditing by medical student reviewers, producing correctness judgments and annotations of reasoning errors via a custom web-based evaluation system. We then leverage this dataset to investigate mitigation strategies: a self-critique pipeline, in which the test model reviews its own answers to detect potential errors and regenerates responses for flagged cases, and retrieval-augmented in-context learning (RA-ICL), which exposes the model to hallucinated and corrected examples. Experiments across five open-source LLMs-BioMistral, Llama-3.1, DeepSeek, Qwen2.5, and Qwen3, show that the self-critique strategy improves accuracy for three of five models (p < 0.05) without requiring parameter updates. Med-HEAL provides both a reusable hallucination dataset and a practical framework for studying and mitigating hallucinations in medical LLMs, supporting safer deployment of AI systems in clinical environments. Our code and data are publicly available at https://github.com/yimingliao-blad/med-heal.git.

PaperPDFCode Syntology ran

In Syntology For agents, Syntology's MCP tool lists every function and class Syntology harvested from this paper and whether it ran (how to connect): get_harvested_code_for_paper(arxiv_id="2606.01301")

Code

Syntology Ran 14 of 19 code samples harvested from 1 repository linked to this paper; 5 have no recorded run. Of those that ran: 14 ran with no contract checked.

By repository: found in paper text by Syntology: 19 samples from 1 repository, 14 ran. The run record, sample by sample. “Ran” means executed on a synthesized input, not that the code is correct or reproduces the paper.

yimingliao-blad/med-heal found in paper text by Syntology report

Reachability, where shown, is from one Syntology probe window (2026-09-16 to 2026-09-18); repositories not probed show nothing. GitHub stars are not tracked.

Code Syntology ran Syntology

19 samples harvested; 14 ran; 0 honoured the contract we drafted; 5 have no recorded run. Read from Syntology's graph 2026-09-24; that is when this build read the record, not when the samples ran.

14ran
5unverified

Licence: 0 of the 19 samples are pointer only, meaning Syntology does not serve that copy's text. This page shows no code text for any sample; each one links to its file in the repository.

Harvested from yimingliao-blad/med-heal. “Ran” means the sample executed on a synthesized input. It does not mean the output is correct, and nothing here reproduces the paper's results. “Honoured” and “violated” refer to a contract Syntology drafted from the code itself; “our draft was wrong” and “fixture could not drive it” are failures of Syntology's instrument, not of the code.

Each sample ends with its code_sha256, Syntology's identity for that exact code. An agent fetches the stored sample with Syntology's MCP tool get_code(code_sha256="…") (how to connect); click an identity to copy that call.

Repository labels, per sample. official repository: The archive marks this repository official for the paper. named in the paper: The archive records that the paper mentions this repository; it is not marked official. community (archive-listed): In the archive's code links for this paper, not marked official and not recorded as mentioned in the paper. found in paper text by Syntology: Syntology found this repository in the paper's own text; whether it is the authors' implementation is not asserted. community: Not in the archive's code links for this paper; a community repository Syntology harvested. Samples from a repository marked official are listed first. Licence labels name the repository's licence as recorded at harvest. “Pointer only” means Syntology does not serve that copy's text, for one of four reasons: no licence file was found; the licence was not identified; the licence is recorded as permissive but that copy's record is not marked cleared; or the licence is outside the permissive list Syntology serves text under (MIT, Apache-2.0, BSD and similar). Some licences outside that list permit redistribution, such as WTFPL, and GPL-3.0 under its conditions; they are simply not on the list. Hover a licence label for the reason. File links open the file on GitHub at the default branch, which may have changed since the harvest.

assemble_note_text yimingliao-blad/med-heal/src/pre_atom/legacy/pilot_12_ra_icl/build_note_embeddings.py found in paper text by Syntology ran Apache-2.0 (permissive) · 70bb037a2b4cc449 · report
bootstrap_delta yimingliao-blad/med-heal/src/pre_atom/stats.py found in paper text by Syntology ran Apache-2.0 (permissive) · 2416e8bb6e0a9f35 · report
build_judge_user yimingliao-blad/med-heal/src/pre_atom/llm.py found in paper text by Syntology ran fingerprinted Apache-2.0 (permissive) · a7b09b0a06d8ff5a · report
build_pool_embeddings yimingliao-blad/med-heal/src/pre_atom/legacy/pilot_12_ra_icl/build_note_embeddings.py found in paper text by Syntology ran Apache-2.0 (permissive) · 9fafe34c699ee2cb · report
copy_asset yimingliao-blad/med-heal/src/pre_atom/data_assets.py found in paper text by Syntology ran Apache-2.0 (permissive) · ae3a16d5b0034f27 · report
env_for_legacy yimingliao-blad/med-heal/src/pre_atom/config.py found in paper text by Syntology ran Apache-2.0 (permissive) · 0de6339bc4fc5b3a · report
evaluate_one yimingliao-blad/med-heal/src/pre_atom/legacy/pilot_12_ra_icl/evaluate_fullscale_pilot12.py found in paper text by Syntology ran Apache-2.0 (permissive) · b38b8b67b3db5da2 · report
file_info yimingliao-blad/med-heal/src/pre_atom/data_assets.py found in paper text by Syntology ran Apache-2.0 (permissive) · f0ebc27fe5d62c02 · report
load_pilot7_controls yimingliao-blad/med-heal/src/pre_atom/legacy/pilot_12_ra_icl/analyze_pilot12.py found in paper text by Syntology ran Apache-2.0 (permissive) · b9a261c5c75e6950 · report
mcnemar_exact yimingliao-blad/med-heal/src/pre_atom/stats.py found in paper text by Syntology ran Apache-2.0 (permissive) · 6f6260842721f3e9 · report
paired_summary yimingliao-blad/med-heal/src/pre_atom/stats.py found in paper text by Syntology ran Apache-2.0 (permissive) · de3d34655b0969fb · report
parse_binary yimingliao-blad/med-heal/src/pre_atom/llm.py found in paper text by Syntology ran fingerprinted Apache-2.0 (permissive) · e125c6da102eac5a · report
resolve_path yimingliao-blad/med-heal/src/pre_atom/config.py found in paper text by Syntology ran Apache-2.0 (permissive) · 1aea88fcb5ac567a · report
resolve_project_path yimingliao-blad/med-heal/src/pre_atom/data_assets.py found in paper text by Syntology ran Apache-2.0 (permissive) · ccfe2f5d5709a273 · report
classify_question yimingliao-blad/med-heal/src/pre_atom/legacy/pilot_12_ra_icl/analyze_fullscale_pilot12.py found in paper text by Syntology unverified Apache-2.0 (permissive) · 60514da571582bde · report
load_config yimingliao-blad/med-heal/src/pre_atom/config.py found in paper text by Syntology unverified Apache-2.0 (permissive) · 438722c182de3c8c · report
load_correct_pool yimingliao-blad/med-heal/src/pre_atom/legacy/pilot_12_ra_icl/build_retrieval_indices.py found in paper text by Syntology unverified Apache-2.0 (permissive) · 9670ba25faf901be · report
load_pilot_baseline yimingliao-blad/med-heal/src/pre_atom/legacy/pilot_12_ra_icl/analyze_pilot12_phase3.py found in paper text by Syntology unverified Apache-2.0 (permissive) · 83941c06f092f61e · report
write_matrix yimingliao-blad/med-heal/src/pre_atom/registry.py found in paper text by Syntology unverified Apache-2.0 (permissive) · 4e4f08fa346f0d9f · report

Results from the paper

The Papers with Code archive ends with its 2025-07-28 snapshot. This paper's arXiv identifier, 2606.01301, was issued in June 2026, after that date, so the archive has no leaderboard rows for it.

Report a problem or propose a change · a person checks every report against the paper or source before anything changes; decisions are listed on /corrections