Understanding contraceptive switching rationales from real world clinical notes using large language models
Open Access
- 23 April 2025
- journal article
- research article
- Published by Springer Nature in npj Digital Medicine
- Vol. 8 (1) , 1-8
Abstract
Understanding reasons for treatment switching is of significant medical interest, but these factors are often only found in unstructured clinical notes and can be difficult to extract. We evaluated the zero-shot abilities of GPT-4 and eight other open-source large language models (LLMs) to extract contraceptive switching information from 1964 clinical notes derived from the UCSF Information Commons dataset. GPT-4 extracted the contraceptives started and stopped at each switch with microF1 scores of 0.85 and 0.88, respectively, compared to 0.81 and 0.88 for the best open-source model. When evaluated by clinical experts, GPT-4 extracted reasons for switching with an accuracy of 91.4% (2.2% hallucination rate). Transformer-based topic modeling identified patient preference, adverse events, and insurance coverage as key reasons. These findings demonstrate the value of LLMs in identifying complex treatment factors and provide insights into reasons for contraceptive switching in real-world settings.Keywords
This publication has 46 references indexed in Scilit:
- Use of a Large Language Model to Assess Clinical Acuity of Adults in the Emergency DepartmentJAMA Network Open, 2024
- Large language models encode clinical knowledgeNature, 2023
- Contraceptive method type and satisfaction, confidence in use, and switching intentionsContraception, 2021
- The Impact of Social Determinants of Health on Medication Adherence: a Systematic Review and Meta-analysisJournal of General Internal Medicine, 2021
- SciPy 1.0: fundamental algorithms for scientific computing in PythonNature Methods, 2020
- Reasons for discontinuation of contraception among women with a current unintended pregnancy in 36 low and middle-income countriesContraception, 2020
- Predictors of Discontinuation of Long-Acting Reversible Contraception Before 30 Months of Use by Adolescents and Young WomenJournal of Adolescent Health, 2019
- Predictors of contraceptive switching and discontinuation within the first 6 months of use among Highly Effective Reversible Contraceptive Initiative Salt Lake study participantsAmerican Journal of Obstetrics and Gynecology, 2019
- Weight change at 12 months in users of three progestin-only contraceptive methodsContraception, 2013
- Density-Based Clustering Based on Hierarchical Density Estimates2013