TY - JOUR AU - Song, Xiaowei AU - Wang, Jiayi AU - He, Feifei AU - Yin, Wei AU - Ma, Weizhi AU - Wu, Jian PY - 2025 DA - 2025/2/26 TI - Stroke Diagnosis and Prediction Tool Using ChatGLM: Development and Validation Study JO - J Med Internet Res SP - e67010 VL - 27 KW - stroke KW - diagnosis KW - large language model KW - ChatGLM KW - generative language model KW - primary care KW - acute stroke KW - prediction tool KW - stroke detection KW - treatment KW - electronic health records KW - noncontrast computed tomography AB - Background: Stroke is a globally prevalent disease that imposes a significant burden on health care systems and national economies. Accurate and rapid stroke diagnosis can substantially increase reperfusion rates, mitigate disability, and reduce mortality. However, there are considerable discrepancies in the diagnosis and treatment of acute stroke. Objective: The aim of this study is to develop and validate a stroke diagnosis and prediction tool using ChatGLM-6B, which uses free-text information from electronic health records in conjunction with noncontrast computed tomography (NCCT) reports to enhance stroke detection and treatment. Methods: A large language model (LLM) using ChatGLM-6B was proposed to facilitate stroke diagnosis by identifying optimal input combinations, using external tools, and applying instruction tuning and low-rank adaptation (LoRA) techniques. A dataset containing details of 1885 patients with and those without stroke from 2016 to 2024 was used for training and internal validation; another 335 patients from two hospitals were used as an external test set, including 230 patients from the training hospital but admitted at different periods, and 105 patients from another hospital. Results: The LLM, which is based on clinical notes and NCCT, demonstrates exceptionally high accuracy in stroke diagnosis, achieving 99% in the internal validation dataset and 95.5% and 79.1% in two external test cohorts. It effectively distinguishes between ischemia and hemorrhage, with an accuracy of 100% in the validation dataset and 99.1% and 97.1% in the other test cohorts. In addition, it identifies large vessel occlusions (LVO) with an accuracy of 80% in the validation dataset and 88.6% and 83.3% in the other test cohorts. Furthermore, it screens patients eligible for intravenous thrombolysis (IVT) with an accuracy of 89.4% in the validation dataset and 60% and 80% in the other test cohorts. Conclusions: We developed an LLM that leverages clinical text and NCCT to identify strokes and guide recanalization therapy. While our results necessitate validation through widespread deployment, they hold the potential to enhance stroke identification and reduce reperfusion time. SN - 1438-8871 UR - https://www.jmir.org/2025/1/e67010 UR - https://doi.org/10.2196/67010 DO - 10.2196/67010 ID - info:doi/10.2196/67010 ER -