Large Language Model–Generated Patient Instructions for Prescriptions in Primary Health Care: Preclinical Algorithm Validation
Abstract
BACKGROUND: The application of generative artificial intelligence to simplify medication use instructions has the potential to enhance people's health by improving treatment adherence. OBJECTIVE: We evaluated the performance of large language models (LLMs) in generating medication usage instructions to complement prescriptions in primary health care. METHODS: This randomized, blinded experimental preclinical study used prescription-inducing scenarios, assigned to 62 health care professionals, to validate instructions generated by LLMs during electronic prescriptions. The instructions were generated by ChatGPT-4.0 (OpenAI), Llama3.1-8B (Meta), and Llama3.1-8B-RAG (Meta) using retrieval-augmented generation based on patient information leaflets. Performance metrics assessed adequacy, completeness, clarity, language simplification, usefulness, and errors in the generated instructions, with scores to analyze overall and individual metrics. RESULTS: The 3 models yielded high overall scores for producing qualified instructions (ChatGPT-4.0: median 88.4, IQR 22.8; Llama3.1-8B: median 66.5, IQR 50.9; Llama3.1-8B-RAG: median 79.9, IQR 34.4; Kruskal-Wallis test P=.003). Llama3.1-8B-RAG received evaluations with similar overall scores to ChatGPT-4.0 (post hoc test, P=.05) and similar to Llama3.1-8B (post hoc test, P=.44). ChatGPT-4.0 outperformed Llama3.1-8B (Bonferroni test, P
Fields of Study & Subjects
Machine Learning in Healthcare
Artificial Intelligence in Healthcare and Education
Electronic Health Records Systems
Publication details
- Journal / source
- Journal of Medical Internet Research
- Publisher
- JMIR Publications Inc.
- Volume
- 28
- Pages
- e84444–e84444
- Publication date
- 27 February 2026
- Language
- EN