Cited by 45Machine Learning in HealthcareBiomedical Text Mining and OntologiesArtificial Intelligence in Healthcare and Education

Leveraging GPT-4 for identifying cancer phenotypes in electronic health records: a performance comparison between GPT-4, GPT-3.5-turbo, Flan-T5, Llama-3-8B, and spaCy’s rule-based and machine learning-based methods

Open access
Bhattarai, Kriti, Oh, Inez Y, Sierra, Jonathan Moran, Tang, Jonathan, Payne, Philip R O, Abrams, Zach, Lai, Albert M·2024·JAMIA Open

Abstract

Objective: Accurately 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 OpenAI’s 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, Llama-3-8B, and 2 rule-based and machine learning-based methods, namely, scispaCy and medspaCy. Materials and Methods: Phenotypes such as initial cancer stage, initial treatment, evidence of cancer recurrence, and affected organs during recurrence were identified from 13 646 clinical notes 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, Llama-3-8B, medspaCy, and scispaCy by comparing precision, recall, and micro-F1 scores. Results: GPT-4 achieved higher F1 score, precision, and recall compared to Flan-T5-xl, Flan-T5-xxl, Llama-3-8B, medspaCy, and scispaCy’s models. GPT-3.5-turbo performed similarly to that of GPT-4. GPT, Flan-T5, and Llama 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 Conclusion: GPT-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.

The claims and statistics of this paper haven’t been checked yet.

Run the check — free, no account needed. It reads the open-access text and checks the sources it cites.

A few free checks a day · papers already verified open instantly · results are public

Integrity signals

Registry

Crossref · 10.1093/jamiaopen/ooae060

Cites

4 of 4 references verified0 citation errors · 0 not checkable

Statistics

Claims the paper makes

The claims and statistics of this paper haven’t been checked yet.

Run the check — free, no account needed. It reads the open-access text and checks the sources it cites.

A few free checks a day · papers already verified open instantly · results are public

Claims other papers make about this one

Each is checked against this paper’s own text: does it say what the citing paper says it does?

  • The ability to identify linguistically complex constructs at scale has implications for mixed-methods researchers, in that measures that were previously unquantifiable may be quantified.

    “The ability to identify linguistically complex constructs at scale also has implications for mixed-methods researchers, in that measures that were previously unquantifiable may be quantified.39–42”

    From Assessment of a Zero-Shot Large Language Model in Measuring Documented Goals-of-Care Discussions (2026) · cites this paper as [39]

    The Introduction (page unavailable) says NLP can turn information in unstructured clinical records into structured representations, including information unavailable in structured data. That supports the possibility of measuring information previously difficult to capture, but the paper addresses cancer phenotypes, not mixed-methods research or linguistically complex constructs broadly, and does not establish that such measures were previously unquantifiable. (LLM, conf=0.82)

    Experimental — accuracy not yet measured

Self-check

Percentages, sums and reported differences re-computed from the paper’s own numbers.

The self-check needs the paper’s full text.

Cites

Flagged first, then by citations

Research works printed but not linked: 29

  1. [1]Cronin RM, Fabbria D, Denny JC, et al A comparison of rule-based and machine learning approaches for classifying patient portal messages. Int J Med Inf. 2017; 105: 110- 120. PMC5546247 28750904
  2. [2]Oh IY, Schindler SE, Ghoshal N, et al Extraction of clinical phenotypes for Alzheimer’s disease dementia from clinical notes using natural language processing. JAMIA Open. 2023; 6(1): ooad014. 36844369 PMC9952043
  3. [3]Tome E, Seljak BK, Korosec P. A rule-based named-entity recognition method for knowledge extraction of evidence-based dietary recommendations. PLoS One. 2017; 12(6): e0179488. 28644863 PMC5482438
  4. [4]Peng Y, Torii M, Wu CH, et al A generalizable NLP framework for fast development of pattern-based biomedical relation extraction systems. BMC Bioinformatics. 2014; 15(1):285. PMC4262219 25149151
  5. [5]Lee S, Shin J, Kim HS, et al Hybrid method incorporating a rule-based approach and deep learning for prescription error prediction. Drug Safety. 2022; 45(1): 27- 35. 34766251
  6. [6]Yang X, Bian J, Hogan WR, et al Clinical concept extraction using transformers. JAMIA. 2020; 27(12): 1935- 1942. 33120431 PMC7727351
  7. [7]Eyre H, Chapman AB, Peterson KS, et al Launching into clinical space with medspaCy: a new clinical text processing toolkit in Python. In: AMIA Annual Symposium Proceedings. San Diego, CA: American Medical Informatics Association; 2021: 438- 447. PMC8861690 35308962
  8. [8]Kocaman V, Talby D. Accurate clinical and biomedical named entity recognition at scale. Softw Impacts. 2022; 13: 100373.
  9. [9]Neumann M, King D, Beltagy I, et al scispaCy: fast and robust models for biomedical natural language processing. In: Proceedings of the 18th BioNLP Workshop and Shared Task. Florence, Italy: Association for Computational Linguistics; 2019: 319- 327.
  10. [10]Sorbello A, Haque SA, Hasan R, et al Artificial intelligence-enabled software prototype to inform opioid phramacovigilance from electronic health records: development and usability study. JMIR AI. 2023; 2: e45000. 37771410 PMC10538589
  11. [11]Gururaja S, Dutt R, Liao T, et al Linguistic representations for fewershot relation extraction across domains. In: Proceedings of the 61st Annual Meeting of the Association for Computational Linguistics. Vol 1. Toronto, Canada: Association for Computational Linguistics; 2023: 7502- 7514.
  12. [12]Li J, Wang Y, Zhang S, et al Rethinking document-level relation extraction: a reality check. In: Proceedings of the 61st Annual Meeting of the Association for Computational Linguistics. Vol 1. Toronto, Canada: Association for Computational Linguistics; 2023: 5715- 5730.
  13. [13]Shibayama S, Yin D, Matsumoto K. Measuring novelty in science with word embedding. PLoS One. 2021; 16(7): e0254034. 34214135 PMC8253414
  14. [14]Yin D, Wu Z, Yokota K, et al Identify novel elements of knowledge with word embedding. PLoS One. 2023; 18(6): e0284567. 37339138 PMC10281565
  15. [15]Gehrmann S, Dernoncourt F, Li Y, et al Comparing deep learning and concept extraction based methods for patient phenotyping from clinical narratives. PLOS One. 2018; 13(2): e0192360. 29447188 PMC5813927
  16. [16]Yang J, Liu C, Deng W, et al Enhancing phenotype recognition in clinical notes using large language models: PhenoBCBERT and PhenoGPT. Patterns. 2023; 5(1): 100887. 38264716 PMC10801236
  17. [17]Rajathi S, Kumar RT, Krishna SV, et al Named entity recognition-based hospital recommendation. In: International Conference on Vision Towards Emerging Trends in Communication and Networking. IEEE; 2023: 1- 6.
  18. [18]Alzoubi H, Alzubi R, Ramzan N, et al A review of automatic phenotyping approaches using electronic health records. MDPI. 2019; 8(11): 1235.
  19. [19]Lossio-Ventura JA, Sun R, Boussard S, et al Clinical concept recognition: evaluation of existing systems on EHRs. Front Artif Intell. 2023; 5: 1051724. 36714202 PMC9880223
  20. [21]Alsentzer E, Murphy J, Boag W, et al Publicly available clinical BERT embeddings. In: Proceedings of the 2nd Clinical Natural Language Processing Workshop. Minneapolis, MN: Association for Computational Linguistics; 2019: 72- 78.
  21. [22]Sivarajkumar S, Wang Y. HealthPrompt: a zero-shot learning paradigm for clinical natural language processing. In: AMIA Annual Symposium Proceedings. Bethesda, MD: American Medical Informatics Association; 2022: 972- 981. PMC10148337 37128372
  22. [23]Yao Z, Cao Y, Yang Z, Deshpande V, Yu H. Extracting biomedical factual knowledge using pretrained language model and electronic health record context. In: AMIA Annual Symposium Proceedings. Bethesda, MD: American Medical Informatics Association; 2022: 1188. PMC10148358 37128373
  23. [24]Agrawal M, Hegselmann S, Lang H, Kim Y, Sontag D. Large language models are few-shot clinical information extractors. In: Proceedings of the 2022 Conference on Empirical Methods in Natural Language Processing. Abu Dhabi, United Arab Emirates: Association for Computational Linguistics; 2022: 1998- 2022.
  24. [25]OpenAI. GPT-4 Technical Report. arXiv: 2303.08774. Preprint posted online March 15, 2023. https://arxiv.org/abs/2303.08774. · arXiv
  25. [27]Savova GK, Tseytlin E, Finan SP, et al DeepPhe-a natural language processing system for extracting cancer phenotypes from clinical records. Cancer Res. 2017; 77(21): e115- e118. 29092954 PMC5690492
  26. [32]Harris PA, Taylor R, Thielke R, et al Research electronic data capture (REDCap) – a metadata-driven methodology and workflow process for providing translational research informatics support. J Biomed Inf. 2009; 42(2): 377- 381. PMC2700030 18929686
  27. [34]Bodenreider O. The unified medical language system (UMLS): integrating biomedical terminology. Nucleic Acids Res. 2004; 32: D267- D270. 14681409 PMC308795
  28. [35]Brown TB, Mann B, Ryder N, et al Language models are few-shot learners. Neural Inf Process Syst. 2020; 33: 1877- 1901.
  29. [36]Hackl V, Muller AE, Granitzer M. Is GPT-4 a reliable rater? Evaluating consistency in GPT-4’s text ratings. Frontiers. 2023; 8: 1272229.

Cited by

Sorted by citations

Authors
Bhattarai, K., Oh, I. Y., Sierra, J. M., Tang, J., Payne, P. R. O., Abrams, Z., & Lai, A. M.
Affiliations
  • Washington University in St. Louis (US)
  • Medical Scientist Training Program, Washington University School of Medicine , St. Louis, MO 63110, United States
  • Institute for Informatics, Data Science & Biostatistics, Washington University School of Medicine , St. Louis, MO 63110, United States
Corresponding author
Bhattarai, Kriti
Venue
JAMIA Open
Published
2024-07-01
Volume
7
Issue
3
Pages
ooae060-ooae060
ISSN
2574-2531 (ISSN-L)
OpenAlex
W4400378221
Cited by
45
References
4
Citations by year
2026: 10 · 2025: 32 · 2024: 3
FWCI
6.64
Type
journal article
Language
en
Open access
Locations
  • JAMIA Open (publishedVersion, cc-by)
  • PubMed Central (publishedVersion, cc-by)
  • PubMed (publishedVersion)
  • Digital Commons@Becker (Washington University School of Medicine) (submittedVersion, cc-by)
Funders
  • Washington University Institute of Clinical and Translational Sciences
  • National Institutes of Health (UL1TR002345)
  • NIH/NIGMS (T32GM007200)
Topics
  • Physical Sciences › Computer Science › Artificial Intelligence › Machine Learning in Healthcare
  • Life Sciences › Biochemistry, Genetics and Molecular Biology › Molecular Biology › Biomedical Text Mining and Ontologies
  • Health Sciences › Medicine › Health Informatics › Artificial Intelligence in Healthcare and Education
Keywords
electronic health records, non-small cell lung cancer, GPT-4, large language models, clinical notes, tumor recurrence, spaCy, rule-based extraction, Flan-T5, Llama-3-8B, GPT-3.5-turbo, performance comparison

About these checks

Registry, retraction, Cites and statistics results are computed, not judged, with one exception: a printed reference that no index lists is read once by a model before it counts as a citation error. Claims are extracted by a model and kept only when their quote appears verbatim in the text; each cited source is then checked, with a model’s help, for whether it says what the claim relies on. Those verdicts can be wrong — read the claim’s quote and the cited source before relying on one.

Statistics and arithmetic are recomputed, not judged.

Confidence bands are shown only for fields calibrated on our annotated test set. None is calibrated yet, so no band is shown.

What counts as a claim ›How we measure confidence ›How we check this ›

Are you an author, or do you see a problem with this page? Request a review