Medical AI · Generative AI & LLMs · Lesson 4 of 7
Hallucination and grounding
Reviewed by Dr. Ram Kumar G, MBBS, MD (Internal Medicine), MPH (USA), on · Last updated
- Intermediate
- Clinical focus
- About 30 minutes
- Includes exercise
Before this lesson: How large language models work, Prompting for clinical tasks
In short
In clinical text, a hallucination is content that is not supported by the source, such as a medicine the patient was never prescribed; an omission is something important that was left out. Both occur even in good systems: one large evaluation of AI-generated clinical notes found hallucinations in 1.47% of sentences, almost half of them potentially harmful. Grounding the model in specific source documents, requiring traceable citations and checking outputs against the source reduce the risk, but a clinician must still review what matters.
You will learn to
- Distinguish hallucinations, contradictions and omissions in generated clinical text
- Measure hallucination and omission rates with sentence-level review
- Build a simple automated check for unsupported numbers and medicines, and know its limits
- Choose grounding strategies and review processes proportionate to the risk
Kinds of error in generated clinical text
Omissions are easy to overlook because nothing on the page looks wrong. In the framework developed by Asgari and colleagues, clinicians reviewed every sentence of AI-generated clinical notes against the consultation transcript. Across 12,999 note sentences, they found a 1.47% hallucination rate, 44% of which were rated major, and a 3.45% omission rate, 17% of which were major.
| Error | Definition | Synthetic example |
|---|---|---|
| Fabrication | Content with no basis in the source | A summary says a new medicine was started when none was |
| Contradiction | Content that conflicts with the source | Source: 'no chest pain'; summary: 'reports chest pain' |
| Distortion | Correct topic, wrong detail | Follow-up in 6 months instead of 3 |
| Omission | Important source content left out | An allergy mentioned in the consultation is missing from the note |
Measuring errors with clinician review
The reference method is sentence-level review: a clinician checks every output sentence against the source, labels unsupported content and its severity, and lists important source content that is missing.
reviews = [
{"note_sentences": 14, "hallucinations": [], "omissions": ["allergy"]},
{"note_sentences": 11, "hallucinations": [("dose changed", "major")], "omissions": []},
{"note_sentences": 16, "hallucinations": [("extra symptom", "minor")],
"omissions": ["follow-up date", "smoking status"]},
{"note_sentences": 12, "hallucinations": [], "omissions": []},
]
sentences = sum(r["note_sentences"] for r in reviews)
halluc = [h for r in reviews for h in r["hallucinations"]]
omissions = sum(len(r["omissions"]) for r in reviews)
major = sum(1 for _, severity in halluc if severity == "major")
print(f"{sentences} sentences reviewed")
print(f"Hallucination rate {len(halluc) / sentences:.1%} ({major} major)")
print(f"Omissions: {omissions} across {len(reviews)} notes")
print(f"Notes with at least one error: "
f"{sum(1 for r in reviews if r['hallucinations'] or r['omissions'])} of {len(reviews)}")
# 53 sentences reviewed
# Hallucination rate 3.8% (1 major)
# Omissions: 3 across 4 notes
# Notes with at least one error: 3 of 4- A low per-sentence error rate can still mean that most notes contain at least one error: here 3 of 4. Report both rates.
- Severity matters more than counts: one changed dose outweighs several minor wording problems.
A simple automated check, and its limits
Full review does not scale, so systems add automated checks. The simplest compares concrete details, such as numbers and medicine names, between output and source.
import re
source = """Synthetic consultation. Patient reports tiredness for three weeks.
On metformin 1 g twice daily. HbA1c last month 8.4%. Blood pressure today 138/86.
No chest pain. Plan: add a second medicine after discussing options; recheck HbA1c in 3 months."""
summary_sentences = [
"Three weeks of tiredness.",
"Takes metformin 1 g twice daily.",
"HbA1c 8.4% last month; blood pressure 138/86.",
"Started on gliclazide 80 mg.", # not in the source
"Reports chest pain on exertion.", # contradicts the source
"Recheck HbA1c in 6 months.", # wrong interval
]
MEDICINES = {"metformin", "gliclazide", "insulin", "sitagliptin", "empagliflozin"}
src = source.lower()
src_numbers = set(re.findall(r"\d+(?:\.\d+)?", src))
def unsupported_details(sentence):
s = sentence.lower()
problems = [f"number {n}" for n in re.findall(r"\d+(?:\.\d+)?", s) if n not in src_numbers]
problems += [f"medicine {m}" for m in MEDICINES if m in s and m not in src]
return problems
for sentence in summary_sentences:
problems = unsupported_details(sentence)
print(("FLAG " if problems else "ok ") + sentence, problems or "")
# ok Three weeks of tiredness.
# ok Takes metformin 1 g twice daily.
# ok HbA1c 8.4% last month; blood pressure 138/86.
# FLAG Started on gliclazide 80 mg. ['number 80', 'medicine gliclazide']
# ok Reports chest pain on exertion.
# FLAG Recheck HbA1c in 6 months. ['number 6']- The check catches the invented medicine and the wrong interval.
- It misses the most dangerous error: 'reports chest pain' passes because the words 'chest pain' appear in the source, inside 'No chest pain'. Negation, paraphrase and wrong attribution need more than word matching.
- Stronger checks use clinical NLP for negation, or a second model asked to verify each sentence against the source. Both reduce, not remove, the need for human review.
Grounding strategies
Grounding means tying output to specific, checkable sources rather than to the model's memory.
| Strategy | How it helps | Remaining risk |
|---|---|---|
| Supply the source in the prompt | The model summarises or answers from the text given | It can still add or distort details |
| Retrieval-augmented generation (RAG) | Relevant passages from trusted documents are retrieved and supplied | Wrong or outdated passages can be retrieved; the answer may not follow them |
| Sentence-level citations | Each statement points to the source passage | Citations can be attached to statements they do not support; they must be checked |
| Automated verification | Rules or a second model check each claim against the source | Misses subtle errors; can create false reassurance |
| Constrained output | Fill fixed fields rather than writing free text | Less flexible; errors in fields still possible |
Matching review to risk
- Lower risk, such as a patient-information draft a clinician edits: spot-checks and clear 'AI-drafted' labelling.
- Medium risk, such as consultation notes entering the record: the responsible clinician reviews every note before signing, and errors are audited periodically.
- Higher risk, such as content that directly influences medicines or triage: regulatory requirements may apply, with formal validation and monitoring.
Regulators are starting to act (as of October 2026)
- In December 2025 the US FDA cleared, through the 510(k) pathway, a prescription app for insulin management in adults with type 2 diabetes that uses a patient-facing large language model; it was described as the first such clearance.
- In August 2026 the FDA's Digital Health Center of Excellence released a discussion paper on the regulation of generative-AI-enabled medical devices for public comment.
Exercise
Measure and reduce hallucinations and omissions in synthetic AI-generated clinic notes.
Data: Ten synthetic consultation transcripts with AI-style draft notes, written for the notebook (Created for this course; no real patient data)
- Review two draft notes sentence by sentence against their transcripts and label hallucinations, contradictions and omissions with severity.
- Compute per-sentence and per-note error rates for all ten notes using the labels provided.
- Run the number-and-medicine checker and calculate its sensitivity for the labelled hallucinations.
- Add a simple negation rule (for example 'no', 'denies', 'without' before a symptom) and measure the improvement.
- Write a one-page review protocol proportionate to how these notes would be used.
The runnable notebook and worked solution will be published soon. You can work through the steps with the code on this page in the meantime.
Key takeaways
- Hallucinations and omissions both occur in good systems; omissions are easier to miss.
- Measure errors per sentence and per document, with severity.
- Simple automated checks catch some errors and miss negations and paraphrases.
- Ground outputs in sources, check citations, and match human review to risk.
Terms used: Grounding, Hallucination, RAG (retrieval-augmented generation)
Related: Summarisation and ambient clinical documentation, RAG track, Prompting for clinical tasks
FAQ
How often do LLMs hallucinate in clinical notes?
It depends on the system and task. In one large evaluation of AI-generated clinical notes, clinicians found unsupported content in 1.47% of sentences and omissions at 3.45%; a substantial share were rated potentially harmful.
Does retrieval-augmented generation stop hallucinations?
It reduces reliance on the model's memory by supplying trusted passages, but the model can still misstate them, and the retrieved passages can be wrong or outdated.
Are citations proof that an answer is correct?
No. Models can attach citations to statements the source does not support. Citations make checking possible; they still need to be checked.
Can another AI model check for hallucinations?
A second model can verify claims against the source and catch many errors, but it can miss subtle ones and agree with the first model's mistakes. Use it to prioritise human review, not replace it.
Who is responsible for errors in an AI-drafted note?
In general, the clinician who reviews and signs the note remains responsible for its content, which is why review processes and clear labelling matter.
Sources
- Asgari E, et al. A framework to assess clinical safety and hallucination rates of LLMs for medical text summarisation. npj Digital Medicine 2025;8:274. doi:10.1038/s41746-025-01670-7
- Ji Z, et al. Survey of hallucination in natural language generation. ACM Computing Surveys 2023;55(12):248. doi:10.1145/3571730
- Lewis P, et al. Retrieval-augmented generation for knowledge-intensive NLP tasks. NeurIPS 2020. arXiv:2005.11401
- US FDA 510(k) database: K253281 (cleared 23 December 2025)
- McGuireWoods. A pathway for clinical AI developers opens: FDA clears first software as a medical device with patient-facing LLM (July 2026)
- Innolitics. FDA releases generative AI medical device discussion paper (August 2026)
Educational content only. This material teaches methods; it is not clinical advice. Code, models and examples here are not validated medical devices and must not be used to make decisions about real patients without proper clinical validation, governance and any required regulatory approval. Examples use synthetic or openly licensed de-identified data only. Never paste identifiable patient information into public AI tools. Mentions of models, tools or vendors are for identification, not endorsement.