Leveraging GPT-4 for Identifying Cancer Phenotypes in Electronic Health Records: A Performance Comparison between GPT-4, GPT-3.5-turbo, Flan-T5 and spaCy's Rule-based & Machine Learning-based methods
Kriti BhattaraiiD, Inez Y. OhiD, Jonathan Moran Sierra, Jonathan E. TangiD, Philip PayneiD, Zachary B. AbramsiD, Albert M. LaiiD
Abstract
ObjectiveAccurately identifying clinical phenotypes from Electronic Health Records (EHRs) provides additional insights into patients health, especially when such information is unavailable in structured data. This study evaluates the application of OpenAIs Generative Pre-trained Transformer (GPT)-4 model to identify clinical phenotypes from EHR text in non-small cell lung cancer (NSCLC) patients. The goal was to identify disease stages, treatments and progression utilizing GPT-4, and compare its performance against GPT-3.5-turbo, Flan-T5-xl, Flan-T5-xxl, and two rule-based and machine learning-based methods, namely, scispaCy and medspaCy. Materials and MethodsPhenotypes such as initial cancer stage, initial treatment, evidence of cancer recurrence, and affected organs during recurrence were identified from 13,646 records for 63 NSCLC patients from Washington University in St. Louis, Missouri. The performance of the GPT-4 model is evaluated against GPT-3.5-turbo, Flan-T5-xxl, Flan-T5-xl, medspaCy and scispaCy by comparing precision, recall, and micro-F1 scores. ResultsGPT-4 achieved higher F1 score, precision, and recall compared to Flan-T5-xl, Flan-T5-xxl, medspaCy and scispaCys models. GPT-3.5-turbo performed similarly to that of GPT-4. GPT and Flan-T5 models were not constrained by explicit rule requirements for contextual pattern recognition. SpaCy models relied on predefined patterns, leading to their suboptimal performance. Discussion and ConclusionGPT-4 improves clinical phenotype identification due to its robust pre-training and remarkable pattern recognition capability on the embedded tokens. It demonstrates data-driven effectiveness even with limited context in the input. While rule-based models remain useful for some tasks, GPT models offer improved contextual understanding of the text, and robust clinical phenotype extraction.
02 /Specification & Classification
Click any tag to browse matching papers- Citations
- 8
- Organism
- Assay
- Research Focus
- Approach
Reproducibility ledger
Nobody has reported trying to reproduce this paper yet. Did you replicate an experiment or run the code? Your report saves the next lab a week.
Sign in to file a reproducibility report.
Related papers
- PhenoXtract: combining Large Language Model and Knowledge Graph embedding to extract phenotypes from clinical descriptions
Silvia Berardelli, Galadriel Brière, … Anaı̈s Baudot·bioRxiv·Jun 26, 2026
- MixEHR-Guided: A guided multi-modal topic modeling approach for large-scale automatic phenotyping using the electronic health record
Yuri Ahuja, Yuesong Zou, … Yue Li·Journal of Biomedical InformaticsPeer-reviewed·Sep 1, 2022
- Harnessing generative AI to annotate the severity of all phenotypic abnormalities within the Human Phenotype Ontology
Kitty B. Murphy, Brian M. Schilder, Nathan Skene·medRxiv·Jun 10, 2024
- Extracting knowledge from scientific texts on patient-derived cancer models using Large Language Models: algorithm development and validation
Jiarui Yao, Zinaida Perova, … Guergana Savova·JMIR Bioinformatics and BiotechnologyPeer-reviewed·Jun 30, 2025
- PhenoID, a language model normalizer of physical examinations from genetics clinical notes
Davy Weissenbacher, Siddharth Rawal, … Ian M. Campbell·medRxiv·Oct 16, 2023
- Augmented Intelligence with Natural Language Processing Applied to Electronic Health Records is Useful for Identifying Patients with Non-Alcoholic Fatty Liver Disease at Risk for Disease Progression
Tielman T. Van Vleck, Lili Chan, … Girish N. Nadkarni·International Journal of Medical InformaticsPeer-reviewed·Jul 6, 2019