Skip to main page content
U.S. flag

An official website of the United States government

Dot gov

The .gov means it’s official.
Federal government websites often end in .gov or .mil. Before sharing sensitive information, make sure you’re on a federal government site.

Https

The site is secure.
The https:// ensures that you are connecting to the official website and that any information you provide is encrypted and transmitted securely.

Access keys NCBI Homepage MyNCBI Homepage Main Content Main Navigation
. 2025 May 22:27:e66365.
doi: 10.2196/66365.

Identifying Kidney Stone Risk Factors Through Patient Experiences With a Large Language Model: Text Analysis and Empirical Study

Affiliations

Identifying Kidney Stone Risk Factors Through Patient Experiences With a Large Language Model: Text Analysis and Empirical Study

Chao Mao et al. J Med Internet Res. .

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.

PubMed Disclaimer

Conflict of interest statement

Conflicts of Interest: None declared.

Figures

Figure 1
Figure 1
A method for identifying kidney stone risk factors based on GPT-4. (A) Data collection and processing, aiming to obtain a clean dataset. (B) Professional doctors participate in the construction of LLMs, summarize the risk factors of kidney stones, and organize related topic words through the latest relevant literature and medical guidelines. (C) Identification of risk factors, using the LtM prompt engineering method and combining the above-mentioned Risk-factors and Topic-words to identify risk factors in user comments. LLM: large language model; LtM: least-to-most.

Similar articles

References

    1. Mayans L. Nephrolithiasis. Primary Care. 2019;46(2):203–212. doi: 10.1016/j.pop.2019.02.001.S0095-4543(19)30004-1 - DOI - PubMed
    1. Bishop K, Momah T, Ricks J. Nephrolithiasis. Primary Care. 2020;47(4):661–671. doi: 10.1016/j.pop.2020.08.005.S0095-4543(20)30059-2 - DOI - PubMed
    1. Türk C, Petřík A, Sarica K, Seitz C, Skolarikos A, Straub M, Knoll T. EAU Guidelines on diagnosis and conservative management of urolithiasis. Eur Urol. 2016;69(3):468–474. doi: 10.1016/j.eururo.2015.07.040.S0302-2838(15)00699-5 - DOI - PubMed
    1. 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
    1. 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

LinkOut - more resources