Enhanced LLM-supported instructions for medication use through retrieval-augmented generation
Prescription systems support medication treatment by standardizing content, enhancing legibility and promoting correct dispensation. Challenges remain to personalize use instructions with sufficient clarity to meet patients' needs. Large Language Models (LLMs) are promising to improve communication in healthcare. This study investigates LLM Retrieval-Augmented Generation (RAG) drawing on patient information leaflets (PIL). We used a database with 119 outpatient scenarios to prepare prescriptions as input to LLMs. We evaluated patient instructions generated by open-source Llama3, using a standard prompt - model1, enhanced prompts with structured guidance - model2, and RAG-enhanced prompts incorporating PIL information from the Brazilian Health Regulatory Agency - model3. Five physicians independently scored the model-generated instructions, assessing adequacy, clarity, personalization and quality compared to reference texts; they reported their confidence level to perform the evaluation. Cosine similarity was computed between model-generated and reference texts. RAG introduction significantly improved instructions adequacy: median (interquartile range) 93.0 (40.0) vs. 94 (53.3) vs 100 (15.0), p = 0.001, and clarity 90.0 (60.0) vs. 92 (55.0) vs 95.0 (24.0), p = 0.012, for model1, model2, and model3 respectively. Enhanced prompt plus RAG in PIL reduced critical errors such as incorrect and incomplete instructions and factual inaccuracies. Prompt engineering positively impacted output, precluding the generation of vague and unsolicited instructions. Little impact of hallucination was found. Our findings underscore the role of AI in promoting safer medication use by incorporating authoritative medication information while maintaining concise and patient-friendly language. Human validation of output ensures error-free and safe implementation.
Authors
- Cristiane dos Santos Dias (ORCID: https://orcid.org/0000-0001-6559-3300)
- Flávia Ribeiro de Oliveira (ORCID: https://orcid.org/0000-0001-6282-7781)
- Juliana Almeida Oliveira (ORCID: https://orcid.org/0000-0002-4704-2318)
- Antônio Pereira de Souza Júnior
- Eura Martins Lage (ORCID: https://orcid.org/0000-0002-7614-695X)
- Igor de Carvalho Gomes (ORCID: https://orcid.org/0000-0002-0883-0063)
- Elisa Tuler de Albergaria (ORCID: https://orcid.org/0000-0003-3595-9978)
- Zilma Silveira Nogueira Reis (ORCID: https://orcid.org/0000-0001-6374-9295)
- Leonardo Rocha (ORCID: https://orcid.org/0000-0002-4913-4902)
- Isaias José Ramos de Oliveira
- Adriana Silvina Pagano
- Davi Dos Reis de Jesus
Institutions
- Universidade Federal de Minas Gerais (BR)
- Ministério da Saúde (BR)
- Federal University of São João del-Rei (BR)
Publication Details
- Journal
- Computers in Biology and Medicine
- Published
- 2025-10-11
- DOI
- https://doi.org/10.1016/j.compbiomed.2025.111135
- Citations
- 1
- Primary Topic
- Semantic Web and Ontologies
- Type
- article
- Field-Weighted Citation Impact
- 2.48