Prompt engineering with a large language model to assist providers in responding to patient inquiries: a real-time implementation in the electronic health record
Related Experiment Video
Updated: Jun 16, 2025

Augmenting Large Language Models via Vector Embeddings to Improve Domain-Specific Responsiveness
Published on: December 6, 2024
Majid Afshar1,2, Yanjun Gao1, Graham Wills2
1Department of Medicine, University of Wisconsin School of Medicine and Public Health, Madison, WI 53792, United States.
Background:
Large language models (LLMs) can assist providers in drafting responses to patient inquiries. We examined a prompt engineering strategy to draft responses for providers in the electronic health record. The aim was to evaluate the change in usability after prompt engineering.
Materials And Methods:
A pre-post study over 8 months was conducted across 27 providers. The primary outcome was the provider use of LLM-generated messages from Generative Pre-Trained Transformer 4 (GPT-4) in a mixed-effects model, and the secondary outcome was provider sentiment analysis.
Results:
Of the 7605 messages generated, 17.5% (n = 1327) were used. There was a reduction in negative sentiment with an odds ratio of 0.43 (95% CI, 0.36-0.52), but message use decreased (P < .01). The addition of nurses after the study period led to an increase in message use to 35.8% (P < .01).
Discussion:
The improvement in sentiment with prompt engineering suggests better content quality, but the initial decrease in usage highlights the need for integration with human factors design.
Conclusion:
Future studies should explore strategies for optimizing the integration of LLMs into the provider workflow to maximize both usability and effectiveness.
More Related Videos
Related Concept Videos
Methods of Documentation VII: EMR
Issues And Trends In Healthcare Delivery System
Cost Containment
Payment for healthcare services has historically promoted adoption of costly and often unnecessary or inefficient...

