{"title":"The large language model diagnoses tuberculous pleural effusion in pleural effusion patients through clinical feature landscapes.","authors":"Chaoling Wu, Wanyi Liu, Pengfei Mei, Yunyun Liu, Jian Cai, Lu Liu, Juan Wang, Xuefeng Ling, Mingxue Wang, Yuanyuan Cheng, Manbi He, Qin He, Qi He, Xiaoliang Yuan, Jianlin Tong","doi":"10.1186/s12931-025-03130-y","DOIUrl":null,"url":null,"abstract":"<p><strong>Background: </strong>Tuberculous pleural effusion (TPE) is a challenging extrapulmonary manifestation of tuberculosis, with traditional diagnostic methods often involving invasive surgery and being time-consuming. While various machine learning and statistical models have been proposed for TPE diagnosis, these methods are typically limited by complexities in data processing and difficulties in feature integration. Therefore, this study aims to develop a diagnostic model for TPE using ChatGPT-4, a large language model (LLM), and compare its performance with traditional logistic regression and machine learning models. By highlighting the advantages of LLMs in handling complex clinical data, identifying interrelationships between features, and improving diagnostic accuracy, this study seeks to provide a more efficient and precise solution for the early diagnosis of TPE.</p><p><strong>Methods: </strong>We conducted a cross-sectional study, collecting clinical data from 109 TPE and 54 non-TPE patients for analysis, selecting 73 features from over 600 initial variables. The performance of the LLM was compared with logistic regression and machine learning models (k-Nearest Neighbors, Random Forest, Support Vector Machines) using metrics like area under the curve (AUC), F1 score, sensitivity, and specificity.</p><p><strong>Results: </strong>The LLM showed comparable performance to machine learning models, outperforming logistic regression in sensitivity, specificity, and overall diagnostic accuracy. Key features such as adenosine deaminase (ADA) levels and monocyte percentage were effectively integrated into the model. We also developed a Python package ( https://pypi.org/project/tpeai/ ) for rapid TPE diagnosis based on clinical data.</p><p><strong>Conclusions: </strong>The LLM-based model offers a non-surgical, accurate, and cost-effective method for early TPE diagnosis. The Python package provides a user-friendly tool for clinicians, with potential for broader use. Further validation in larger datasets is needed to optimize the model for clinical application.</p>","PeriodicalId":49131,"journal":{"name":"Respiratory Research","volume":"26 1","pages":"52"},"PeriodicalIF":5.8000,"publicationDate":"2025-02-12","publicationTypes":"Journal Article","fieldsOfStudy":null,"isOpenAccess":false,"openAccessPdf":"https://www.ncbi.nlm.nih.gov/pmc/articles/PMC11823098/pdf/","citationCount":"0","resultStr":null,"platform":"Semanticscholar","paperid":null,"PeriodicalName":"Respiratory Research","FirstCategoryId":"3","ListUrlMain":"https://doi.org/10.1186/s12931-025-03130-y","RegionNum":2,"RegionCategory":"医学","ArticlePicture":[],"TitleCN":null,"AbstractTextCN":null,"PMCID":null,"EPubDate":"","PubModel":"","JCR":"Q1","JCRName":"Medicine","Score":null,"Total":0}
引用次数: 0
Abstract
Background: Tuberculous pleural effusion (TPE) is a challenging extrapulmonary manifestation of tuberculosis, with traditional diagnostic methods often involving invasive surgery and being time-consuming. While various machine learning and statistical models have been proposed for TPE diagnosis, these methods are typically limited by complexities in data processing and difficulties in feature integration. Therefore, this study aims to develop a diagnostic model for TPE using ChatGPT-4, a large language model (LLM), and compare its performance with traditional logistic regression and machine learning models. By highlighting the advantages of LLMs in handling complex clinical data, identifying interrelationships between features, and improving diagnostic accuracy, this study seeks to provide a more efficient and precise solution for the early diagnosis of TPE.
Methods: We conducted a cross-sectional study, collecting clinical data from 109 TPE and 54 non-TPE patients for analysis, selecting 73 features from over 600 initial variables. The performance of the LLM was compared with logistic regression and machine learning models (k-Nearest Neighbors, Random Forest, Support Vector Machines) using metrics like area under the curve (AUC), F1 score, sensitivity, and specificity.
Results: The LLM showed comparable performance to machine learning models, outperforming logistic regression in sensitivity, specificity, and overall diagnostic accuracy. Key features such as adenosine deaminase (ADA) levels and monocyte percentage were effectively integrated into the model. We also developed a Python package ( https://pypi.org/project/tpeai/ ) for rapid TPE diagnosis based on clinical data.
Conclusions: The LLM-based model offers a non-surgical, accurate, and cost-effective method for early TPE diagnosis. The Python package provides a user-friendly tool for clinicians, with potential for broader use. Further validation in larger datasets is needed to optimize the model for clinical application.
期刊介绍:
Respiratory Research publishes high-quality clinical and basic research, review and commentary articles on all aspects of respiratory medicine and related diseases.
As the leading fully open access journal in the field, Respiratory Research provides an essential resource for pulmonologists, allergists, immunologists and other physicians, researchers, healthcare workers and medical students with worldwide dissemination of articles resulting in high visibility and generating international discussion.
Topics of specific interest include asthma, chronic obstructive pulmonary disease, cystic fibrosis, genetics, infectious diseases, interstitial lung diseases, lung development, lung tumors, occupational and environmental factors, pulmonary circulation, pulmonary pharmacology and therapeutics, respiratory immunology, respiratory physiology, and sleep-related respiratory problems.