Automated Phenotypic Characterization in Rare Hematologic Malignancies Using a Large Language Model-Based Framework

Wait 5 sec.

Background. Diagnosis and risk stratification in rare hematologic malignancies such as myeloproliferative neoplasms (MPNs) - polycythemia vera (PV), essential thrombocythemia (ET), and myelofibrosis (MF) - require expert review of longitudinal, heterogeneous clinical records. This process is cognitively demanding, inconsistently applied, and difficult to scale beyond tertiary centers. No automated phenotyping workflow currently exists for hematologic malignancies. Methods. A HIPAA-compliant large language model (LLM) framework for phenotyping MPN was developed to integrate (i) rule-based retrieval of bone marrow biopsy reports, clinical notes, and structured laboratory results from the electronic health record (EHR); (ii) zero-shot extraction of diagnostic and prognostic variables from unstructured text using GPT-4 Turbo; (iii) a clinician-informed source-prioritization algorithm to reconcile conflicting multi-source data; (iv) WHO/ICC-criteria-based diagnostic classification; and (v) NCCN-based risk stratification using the conventional risk model for PV, IPSET-thrombosis for ET, and DIPSS, DIPSS-plus, and MIPSS70/MIPSS70+ v2 for MF. Patients were identified via MPN-related ICD-9/10 codes; cases met 2017 WHO criteria or had a hematologist-documented diagnosis, and controls did not. The cohort was split into a prompt-development set (n = 60) and a held-out test set (n = 450; 75 cases and 75 controls per disease). Ground truth was established by independent dual-clinician chart review with consensus adjudication. LLM performance was evaluated against the ground truth: variable-level extraction using accuracy, F1 score, and Cohen's kappa; patient-level diagnostic classification using sensitivity, specificity, and Cohen's kappa; and prognostic risk stratification (among confirmed cases) using accuracy, weighted F1 score, and quadratic-weighted Cohen's kappa. Wilson 95% confidence intervals (CIs) were used for proportions and bootstrap 95% CIs with 500 resamples for F1 scores. Results. The held-out test set included 450 patients (PV: 150; ET: 150; MF: 150) with pathology reports and structured laboratory results, and 172 patients (PV: 52; ET: 55; MF: 65) with clinical notes. From pathology reports, overall variable extraction accuracy and F1 score were 99% (95% CI, 98-100) and 1.00 (0.99-1.00) for PV, 100% (99-100) and 0.99 (0.96-1.00) for ET, and 100% (99-100) and 0.99 (0.97-1.00) for MF. From clinical notes, overall accuracy and F1 score were 96% (91-100) and 0.94 (0.85-1.00) for PV, 100% (100-100) and 1.00 (1.00-1.00) for ET, and 100% (99-100) and 0.98 (0.95-1.00) for MF. Diagnostic sensitivity was 100% (95% CI, 95.1-100.0) for PV, ET, and MF; specificity was 98.7% (92.8-99.8) for PV and 100% (95.1-100.0) for both ET and MF, with Cohen's kappa of 0.99 for PV and 1.00 for ET and MF. Risk stratification accuracy was 100% with weighted F1 score of 1.00 and quadratic-weighted Cohen's kappa of 1.00 across all three diseases. A pre-specified source-ablation analysis showed that pathology reports alone were sufficient for diagnosis (sensitivity 98.7% for PV, 100% for ET, 96.0% for MF; specificity 100% across all three subtypes) but inadequate for prognostication (accuracy 69.3% for PV, 93.3% for ET, 77.3% for MF). Adding clinical notes to pathology reports recovered full prognostic accuracy of 100% across all three diseases. Conclusions. This first-in-class automated framework achieved expert-level performance for MPN diagnosis and risk stratification from real-world EHR data, establishing a foundation for scalable, standardized phenotyping in rare hematologic malignancies. Prospective, multi-site validation is warranted before clinical deployment.