Development of an LLM Pipeline Surpassing Physicians in Cardiovascular Risk Score Calculation
Authors:
Preprint
Abstract
Background: Risk scores are essential to evidence-based cardiovascular care, but manual calculation is labor-intensive and error-prone. Large language models (LLMs) could automate this process, yet LLMs are limited by their propensity for calculation errors and factual hallucinations. Pipelines that separate LLM-based data extraction from deterministic score computation may improve reliability and transparency. Methods: We conducted a retrospective diagnostic study at a quaternary heart center in Germany (January 2020 - July 2023). Patients with atrial fibrillation (n=179) from an ablation registry and patients with severe aortic stenosis (n=76) evaluated by a heart team were included. Five LLMs (DeepSeek-R1, Qwen3, GPT-4 Turbo, Llama 3.1, and PaLM 2) were tested in standalone and pipeline configurations to compute HAS-BLED, CHA2DS2-VASc, and EuroSCORE II scores from routine clinical reports. Accuracy was assessed by comparing predictions to expert-adjudicated ground truth, using root mean squared error (RMSE), Krippendorff's alpha for categorical agreement, and calibration analysis. Results: Pipeline-generated scores showed substantially higher agreement with expert adjudication than standalone LLMs and treating clinicians (mean Krippendorff's alpha: 0.79 vs 0.32 vs 0.31) and demonstrated superior calibration. The Qwen3-based pipeline, achieved the highest accuracy with lower RMSEs than clinicians for HAS-BLED (0.20 vs 0.87), CHA2DS2-VASc (0.53 vs 1.08), and EuroSCORE II (1.99 vs 2.05). Conclusion: LLM-based pipelines enable accurate, well-calibrated, and scalable cardiovascular risk score computation from unstructured real-world clinical data, outperforming clinicians and standalone LLMs with the potential to reduce clinician workload and support evidence-based care.Keywords
This publication has 12 references indexed in Scilit:
- Large language model agents can use tools to perform clinical calculationsnpj Digital Medicine, 2025
- Lookback Lens: Detecting and Mitigating Contextual Hallucinations in Large Language Models Using Only Attention Maps2024
- Perceptions and knowledge gaps on CHA2DS2-VASc score components: a joint survey of Chinese clinicians and clinical pharmacistsPostgraduate Medicine, 2021
- Risk Analysis in the Age of Big Data: The Promises and PitfallsRisk Analysis, 2021
- Entity-Based Knowledge Conflicts in Question Answering2021
- The interpretation of CHA2DS2-VASc score components in clinical practice: a joint survey by the European Heart Rhythm Association (EHRA) Scientific Initiatives Committee, the EHRA Young Electrophysiologists, the Association of Cardiovascular Nursing and Allied Professionals, and the European Society of Cardiology Council on StrokeEP Europace, 2020
- Aim for Clinical Utility, Not Just Predictive AccuracyEpidemiology, 2020
- EuroSCORE IIEuropean Journal of Cardio-Thoracic Surgery, 2012
- A Novel User-Friendly Score (HAS-BLED) To Assess 1-Year Risk of Major Bleeding in Patients With Atrial FibrillationChest, 2010
- Refining Clinical Risk Stratification for Predicting Stroke and Thromboembolism in Atrial Fibrillation Using a Novel Risk Factor-Based ApproachChest, 2010