Identifying Kidney Stone Risk Factors Through Patient Experiences With a Large Language Model: Text Analysis and Empirical Study
- PMID: 40403294
- PMCID: PMC12141965
- DOI: 10.2196/66365
Identifying Kidney Stone Risk Factors Through Patient Experiences With a Large Language Model: Text Analysis and Empirical Study
Abstract
Background: Kidney stones, a prevalent urinary disease, pose significant health risks. Factors like insufficient water intake or a high-protein diet increase an individual's susceptibility to the disease. Social media platforms can be a valuable avenue for users to share their experiences in managing these risk factors. Analyzing such patient-reported information can provide crucial insights into risk factors, potentially leading to improved quality of life for other patients.
Objective: This study aims to develop a model KSrisk-GPT, based on a large language model (LLM) to identify potential kidney stone risk factors from web-based user experiences.
Methods: This study collected data on the topic of kidney stones on Zhihu in the past 5 years and obtained 11,819 user comments. Experts organized the most common risk factors for kidney stones into six categories. Then, we use the least-to-most prompting in the chain-of-thought prompting to enable GPT-4.0 to think like an expert and ask GPT to identify risk factors from the comments. Metrics, including accuracy, precision, recall, and F1-score, were used to evaluate the performance of such a model.
Results: Our proposed method outperforms other models in identifying comments containing risk factors with 95.9% accuracy and F1-score, with a precision of 95.6% and a recall of 96.2%. Out of the 863 comments identified with risk factors, our analysis showed the most mentioned risk factors for kidney stones in Zhihu user discussions, mainly including dietary habits (high protein, high calcium intake), insufficient water intake, genetic factors, and lifestyle. In addition, new potential risk factors were discovered with GPT, such as excessive use of supplements like vitamin C and calcium, laxatives, and hyperparathyroidism.
Conclusions: Comments from social media users offer a new data source for disease prevention and understanding patient journeys. Our method not only sheds light on using LLMs to efficiently summarize risk factors from social media data but also on LLMs' potential to identify new potential factors from the patient's perspective.
Keywords: GPT-4; chronic disease management; health risk identification; large language model; text analysis.
©Chao Mao, Jiaxuan Li, Patrick Cheong-Iao Pang, Quanjing Zhu, Rong Chen. Originally published in the Journal of Medical Internet Research (https://www.jmir.org), 22.05.2025.
Conflict of interest statement
Conflicts of Interest: None declared.
Figures

Similar articles
-
Large Language Models' Accuracy in Emulating Human Experts' Evaluation of Public Sentiments about Heated Tobacco Products on Social Media: Evaluation Study.J Med Internet Res. 2025 Mar 4;27:e63631. doi: 10.2196/63631. J Med Internet Res. 2025. PMID: 40053746 Free PMC article.
-
Large Language Models Can Enable Inductive Thematic Analysis of a Social Media Corpus in a Single Prompt: Human Validation Study.JMIR Infodemiology. 2024 Aug 29;4:e59641. doi: 10.2196/59641. JMIR Infodemiology. 2024. PMID: 39207842 Free PMC article.
-
Improving entity recognition using ensembles of deep learning and fine-tuned large language models: A case study on adverse event extraction from VAERS and social media.J Biomed Inform. 2025 Mar;163:104789. doi: 10.1016/j.jbi.2025.104789. Epub 2025 Feb 7. J Biomed Inform. 2025. PMID: 39923968
-
Folic acid supplementation and malaria susceptibility and severity among people taking antifolate antimalarial drugs in endemic areas.Cochrane Database Syst Rev. 2022 Feb 1;2(2022):CD014217. doi: 10.1002/14651858.CD014217. Cochrane Database Syst Rev. 2022. PMID: 36321557 Free PMC article.
-
Dietary treatment of urinary risk factors for renal stone formation. A review of CLU Working Group.Arch Ital Urol Androl. 2015 Jul 7;87(2):105-20. doi: 10.4081/aiua.2015.2.105. Arch Ital Urol Androl. 2015. PMID: 26150027 Review.
References
-
- Aksakall I, Kacdioglu S, Hanay YS. Kidney x-ray images classification using machine learning and deep learning methods, Balk J Electr Comput Eng. 2021;9(2):144–151. doi: 10.17694/bajece.878116. - DOI
-
- Bhattacharjee A, Rabea S, Bhattacharjee A, Elkaeed EB, Murugan R, Selim HMRM, Sahu RK, Shazly GA, Bekhit MMS. A multi-class deep learning model for early lung cancer and chronic kidney disease detection using computed tomography images. Front Oncol. 2023;13:1193746. doi: 10.3389/fonc.2023.1193746. https://europepmc.org/abstract/MED/37333825 - DOI - PMC - PubMed
MeSH terms
LinkOut - more resources
Full Text Sources
Miscellaneous