Skip to content

Menu

WorksmedRxiv

Development and Internal Validation of a Large Language Model Pipeline for Multi-Label Classification of Patient Portal Messages

A preview from medRxiv. Valency holds this work's metadata and abstract, not its full text.

Abstract

ObjectivesCharacterizing patient portal message content at scale can help target efforts to manage administrative work. We developed and validated a large language model (LLM) pipeline for multi-label classification of messages using an expert-derived topic taxonomy, then characterized topic distribution across a two-year corpus.

Materials and MethodsWe studied all medical advice request messages sent to ambulatory clinicians at an academic medical center from 2024-2025. We convened an expert panel that derived an 11-category taxonomy through a modified Delphi process. Two annotators labeled 750 randomly selected messages (Cohen kappa 0.80), holding out 500 for evaluation. The pipeline used GPT-4o-mini in a zero-shot prompt. On the held-out set, we measured micro- and macro-averaged precision, recall, and F1, and label stability across runs. We then characterized topic distribution and co-occurrence across the corpus.

ResultsThe pipeline achieved micro- and macro-averaged F1 of 0.89 and 0.86. Labels were identical across runs for 93.6% of messages. Across 2.4 million messages, content concentrated on a few topics. The two most common topics, Problems C Management and Medications C Prescriptions, were present in 67.9% of messages, and the four most common in 93.9%. 51.7% of messages addressed multiple topics.

Discussion and ConclusionThe pipeline classified patient message topics accurately and stably across millions of messages. Message content was concentrated within a small number of topics, highlighting opportunities for targeted interventions and enabling more efficient triage, routing, and patient-facing support.

Paper details

Source

Source
medRxiv
First available
Aug 20, 2026
Identifier
medrxiv:10.64898/2026.08.14.26360460v1

Pick where to look, or just type