Identifying Diagnostic Breakdowns in Patient Experience Survey Comments Using Natural Language Processing: Evaluation Study

BACKGROUND: Patient experience surveys may contain signals of diagnostic breakdowns that are difficult to identify through conventional safety surveillance. Natural language processing (NLP) may enable these narratives to be analyzed at scale. OBJECTIVE: To develop and evaluate three increasingly context-sensitive NLP approaches for identifying patient-perceived diagnostic breakdowns in ambulatory patient experience survey comments and to explore the potential of prompt-engineered large language models (LLMs) for this task. METHODS: We analyzed 523 free-text comments from a 2023 ambulatory patient experience survey at a Canadian academic community hospital. Comments were manually coded using a structured framework to establish a finalized reference standard. Three sequential approaches were developed: a TF-IDF-based XGBoost classifier (Phase I), a fine-tuned Twitter-RoBERTa model (Phase II), and a locally deployed LLaMA 3.3 70B model refined through iterative expert-guided prompt development (Phase III). Phases I and II were evaluated using 5×5 nested stratified cross-validation. Phase III was refined and evaluated on the full dataset and therefore represents development-set rather than independent held-out performance. RESULTS: Following expert review, 51 of 523 comments (9.8%) were classified as diagnostic breakdowns. Compared with Phase I, Phase II showed higher recall (0.767 vs 0.626), F1 score (0.620 vs 0.548), AUROC (0.921 vs 0.810), and AUPRC (0.564 vs 0.490). In Phase III, iterative prompt refinement reduced over-classification of general experiential complaints. The final prompt achieved recall of 0.961, precision of 0.803, specificity of 0.975, and an F1 score of 0.875 on the development dataset. CONCLUSIONS: Patient-authored survey narratives are an underused source of information for diagnostic safety and quality improvement. Context-sensitive NLP approaches may improve detection of subtle diagnostic concerns, and the strong development-set performance of the prompt-engineered LLM supports further study. External validation and prospective evaluation within diagnostic-safety workflows are needed before broader implementation.

Authors

Institutions

Publication Details

Journal
JMIR AI
Published
2026-12-02
DOI
https://doi.org/10.2196/98901
Primary Topic
Sentiment Analysis and Opinion Mining
Type
article
Field-Weighted Citation Impact
0.00
Controls
|||
ALL TIME
JAN
FEB
MAR
APR
MAY
JUN
JUL
AUG
SEP
OCT
NOV
article

Identifying Diagnostic Breakdowns in Patient Experience Survey Comments Using Natural Language Processing: Evaluation Study

Kristen Miller, Helen W. Haskell, Sharifa Kazi, Mary Ann Hill et al.
1 links
JMIR AI
Sentiment Analysis and Opinion Mining
article

Identifying Diagnostic Breakdowns in Patient Experience Survey Comments Using Natural Language Processing: Evaluation Study

Kristen Miller, Helen W. Haskell, Sharifa Kazi, Mary Ann Hill, Traber Davis Giardina, Kewei Ni, Azade Tabaie, Kelly Michelle Smith, Yiyang Qu
article en

Abstract

BACKGROUND: Patient experience surveys may contain signals of diagnostic breakdowns that are difficult to identify through conventional safety surveillance. Natural language processing (NLP) may enable these narratives to be analyzed at scale. OBJECTIVE: To develop and evaluate three increasingly context-sensitive NLP approaches for identifying patient-perceived diagnostic breakdowns in ambulatory patient experience survey comments and to explore the potential of prompt-engineered large language models (LLMs) for this task. METHODS: We analyzed 523 free-text comments from a 2023 ambulatory patient experience survey at a Canadian academic community hospital. Comments were manually coded using a structured framework to establish a finalized reference standard. Three sequential approaches were developed: a TF-IDF-based XGBoost classifier (Phase I), a fine-tuned Twitter-RoBERTa model (Phase II), and a locally deployed LLaMA 3.3 70B model refined through iterative expert-guided prompt development (Phase III). Phases I and II were evaluated using 5×5 nested stratified cross-validation. Phase III was refined and evaluated on the full dataset and therefore represents development-set rather than independent held-out performance. RESULTS: Following expert review, 51 of 523 comments (9.8%) were classified as diagnostic breakdowns. Compared with Phase I, Phase II showed higher recall (0.767 vs 0.626), F1 score (0.620 vs 0.548), AUROC (0.921 vs 0.810), and AUPRC (0.564 vs 0.490). In Phase III, iterative prompt refinement reduced over-classification of general experiential complaints. The final prompt achieved recall of 0.961, precision of 0.803, specificity of 0.975, and an F1 score of 0.875 on the development dataset. CONCLUSIONS: Patient-authored survey narratives are an underused source of information for diagnostic safety and quality improvement. Context-sensitive NLP approaches may improve detection of subtle diagnostic concerns, and the strong development-set performance of the prompt-engineered LLM supports further study. External validation and prospective evaluation within diagnostic-safety workflows are needed before broader implementation.

JMIR AIVol. 5
Michael E. DeBakey VA Medical Center (US), Baylor College of Medicine (US), University of Toronto (CA), Georgetown University Medical Center (US), Toronto East General Hospital (CA), Princess Margaret Cancer Centre (CA), MedStar Health Research Institute (US)
Good health and well-being
Sentiment Analysis and Opinion Mining
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.

Laika access coming soon