
==== Front
medRxiv
MEDRXIV
medRxiv
Cold Spring Harbor Laboratory

10.1101/2024.09.05.24313139
preprint
1
Article
Large language models outperform traditional natural language processing methods in extracting patient-reported outcomes in IBD
Patel Perseus V. http://orcid.org/0000-0002-8287-3424

Davis Conner
Ralbovsky Amariel
Tinoco Daniel
Williams Christopher Y.K.
Slatter Shadera
Naderalvojoud Behzad
Rosen Michael J.
Hernandez-Boussard Tina
Rudrapatna Vivek http://orcid.org/0000-0003-1789-3004

06 9 2024
2024.09.05.24313139https://creativecommons.org/licenses/by-nd/4.0/ This work is licensed under a Creative Commons Attribution-NoDerivatives 4.0 International License, which allows reusers to copy and distribute the material in any medium or format in unadapted form only, and only so long as attribution is given to the creator. The license allows for commercial use.
http://medrxiv.org/lookup/doi/10.1101/2024.09.05.24313139
nihpp-2024.09.05.24313139.pdf
Abstract

Background and Aims

Patient-reported outcomes (PROs) are vital in assessing disease activity and treatment outcomes in inflammatory bowel disease (IBD). However, manual extraction of these PROs from the free-text of clinical notes is burdensome. We aimed to improve data curation from free-text information in the electronic health record, making it more available for research and quality improvement. This study aimed to compare traditional natural language processing (tNLP) and large language models (LLMs) in extracting three IBD PROs (abdominal pain, diarrhea, fecal blood) from clinical notes across two institutions.

Methods

Clinic notes were annotated for each PRO using preset protocols. Models were developed and internally tested at the University of California San Francisco (UCSF), and then externally validated at Stanford University. We compared tNLP and LLM-based models on accuracy, sensitivity, specificity, positive and negative predictive value. Additionally, we conducted fairness and error assessments.

Results

Inter-rater reliability between annotators was >90%. On the UCSF test set (n=50), the top-performing tNLP models showcased accuracies of 92% (abdominal pain), 82% (diarrhea) and 80% (fecal blood), comparable to GPT-4, which was 96%, 88%, and 90% accurate, respectively. On external validation at Stanford (n=250), tNLP models failed to generalize (61-62% accuracy) while GPT-4 maintained accuracies >90%. PaLM-2 and GPT-4 showed similar performance. No biases were detected based on demographics or diagnosis.

Conclusions

LLMs are accurate and generalizable methods for extracting PROs. They maintain excellent accuracy across institutions, despite heterogeneity in note templates and authors. Widespread adoption of such tools has the potential to enhance IBD research and patient care.
==== Body
pmc
