Relationship extraction for adverse drug events in clinical notes using large language models: a retrospective cross-sectional study

BACKGROUND: Adverse drug events (ADEs) are a critical indicator of patient safety but are often documented only in free-text clinical notes. The potential of recent advances in natural language processing (NLP), particularly generative large language models (LLMs), to identify ADEs remains understudied. This study aimed to compare the performance of multiple LLMs in identifying ADE-Drug relationships in inpatient and ambulatory clinical notes. METHODS: We used clinical notes from the 2018 National NLP Clinical Challenge (n2c2) ADE dataset (inpatient; n = 505) and from outpatient encounters (n = 2555) between October 1, 2018, and December 31, 2019, at a large academic medical center based in New England. Notes were pre-processed into snippets for model input. Evaluated Models included: GPT-4o, GPT-4o-mini, Llama 3.2-3B and their instruction fine-tuned variants (including low-rank adapters for Llama). Performance was assessed using both strict and relaxed evaluations (precision, recall, and F1) for all models, followed by manual evaluation (exact semantic match, partial match, missing ADE, drug mention only, not a drug, or wrong) of the two best-performing models. FINDINGS: Of the 1048 notes in the local test split, 450 (42.9%) contained at least one ADE. The n2c2 test set included 202 notes, of which 155 (76.7%) contained at least one ADE. GPT-4o and GPT-4o-mini were the top-performing models among those evaluated. GPT-4o consistently outperformed GPT-4o-mini in ADE extraction across both datasets, with higher F1-scores (0.524 vs. 0.381) and a more balanced precision-recall profile. Both models captured ADEs effectively in explicit and complex clinical contexts, although limitations included misclassification of pre-existing allergies and occasional conflation of therapeutic indications with adverse effects. GPT-4o achieved higher exact match coverage and fewer errors across clinical notes, indicating more reliable performance in both inpatient and ambulatory settings. INTERPRETATION: This work establishes a foundation for integrating LLM methods into real-world drug safety surveillance, with direct implications for improving patient safety. FUNDING: None.

Authors

Institutions

Publication Details

Journal
EBioMedicine
Published
2026-10-17
DOI
https://doi.org/10.1016/j.ebiom.2026.106516
Primary Topic
Pharmacovigilance and Adverse Drug Reactions
Type
article
Field-Weighted Citation Impact
0.00
Controls
|||
ALL TIME
JAN
FEB
MAR
APR
MAY
JUN
JUL
AUG
SEP
OCT
article

Relationship extraction for adverse drug events in clinical notes using large language models: a retrospective cross-sectional study

Huiyuan Zhou, Li Zhou, Mary G. Amato, Diane L. Seger et al.
EBioMedicine
Pharmacovigilance and Adverse Drug Reactions
article

Relationship extraction for adverse drug events in clinical notes using large language models: a retrospective cross-sectional study

Huiyuan Zhou, Li Zhou, Mary G. Amato, Diane L. Seger, David Westfall Bates, Dinah Foer, Joseph Michael Plasek, Gretchen Purcell Jackson, Yiming Li, Shayma Alzaidi
article en

Abstract

BACKGROUND: Adverse drug events (ADEs) are a critical indicator of patient safety but are often documented only in free-text clinical notes. The potential of recent advances in natural language processing (NLP), particularly generative large language models (LLMs), to identify ADEs remains understudied. This study aimed to compare the performance of multiple LLMs in identifying ADE-Drug relationships in inpatient and ambulatory clinical notes. METHODS: We used clinical notes from the 2018 National NLP Clinical Challenge (n2c2) ADE dataset (inpatient; n = 505) and from outpatient encounters (n = 2555) between October 1, 2018, and December 31, 2019, at a large academic medical center based in New England. Notes were pre-processed into snippets for model input. Evaluated Models included: GPT-4o, GPT-4o-mini, Llama 3.2-3B and their instruction fine-tuned variants (including low-rank adapters for Llama). Performance was assessed using both strict and relaxed evaluations (precision, recall, and F1) for all models, followed by manual evaluation (exact semantic match, partial match, missing ADE, drug mention only, not a drug, or wrong) of the two best-performing models. FINDINGS: Of the 1048 notes in the local test split, 450 (42.9%) contained at least one ADE. The n2c2 test set included 202 notes, of which 155 (76.7%) contained at least one ADE. GPT-4o and GPT-4o-mini were the top-performing models among those evaluated. GPT-4o consistently outperformed GPT-4o-mini in ADE extraction across both datasets, with higher F1-scores (0.524 vs. 0.381) and a more balanced precision-recall profile. Both models captured ADEs effectively in explicit and complex clinical contexts, although limitations included misclassification of pre-existing allergies and occasional conflation of therapeutic indications with adverse effects. GPT-4o achieved higher exact match coverage and fewer errors across clinical notes, indicating more reliable performance in both inpatient and ambulatory settings. INTERPRETATION: This work establishes a foundation for integrating LLM methods into real-world drug safety surveillance, with direct implications for improving patient safety. FUNDING: None.

EBioMedicineVol. 133
Brigham and Women's Hospital (US), Harvard University (US), Massachusetts General Hospital (US), Vanderbilt University Medical Center (US)
Good health and well-being
Openalex Percentile: Top 12%
Pharmacovigilance and Adverse Drug Reactions
AI Navigator

Ask Laika to Summarize, Analyze, and Connect papers live on the map.

Summarize Papers & Methodologies

Extract key findings, datasets, and comparative methods across publications.

Benchmark Rankings & Visual Analytics

Rank top research institutions, authors, funders, topics, and journals by Field-Weighted Citation Impact (FWCI) and paper volume with instant charts.

Connect Distant Disciplines

Bridge topological clusters on the map to find hidden collaborative intersections.