Prompt engineering on leveraging large language models in generating response to InBasket messages
Open accessAbstract
OBJECTIVES: Large Language Models (LLMs) have been proposed as a solution to address high volumes of Patient Medical Advice Requests (PMARs). This study addresses whether LLMs can generate high quality draft responses to PMARs that satisfies both patients and clinicians with prompt engineering. MATERIALS AND METHODS: We designed a novel human-involved iterative processes to train and validate prompts to LLM in creating appropriate responses to PMARs. GPT-4 was used to generate response to the messages. We updated the prompts, and evaluated both clinician and patient acceptance of LLM-generated draft responses at each iteration, and tested the optimized prompt on independent validation data sets. The optimized prompt was implemented in the electronic health record production environment and tested by 69 primary care clinicians. RESULTS: After 3 iterations of prompt engineering, physician acceptance of draft suitability increased from 62% to 84% (P <.001) in the validation dataset (N = 200), and 74% of drafts in the test dataset were rated as "helpful." Patients also noted significantly increased favorability of message tone (78%) and overall quality (80%) for the optimized prompt compared to the original prompt in the training dataset, patients were unable to differentiate human and LLM-generated draft PMAR responses for 76% of the messages, in contrast to the earlier preference for human-generated responses. Majority (72%) of clinicians believed it can reduce cognitive load in dealing with InBasket messages. DISCUSSION AND CONCLUSION: Informed by clinician and patient feedback synergistically, tuning in LLM prompt alone can be effective in creating clinically relevant and useful draft responses to PMARs.
The claims and statistics of this paper haven’t been checked yet.
Run the check — free, no account needed. It reads the open-access text and checks the sources it cites.
Integrity signals
Registry
Cites
Statistics
Claims the paper makes
The claims and statistics of this paper haven’t been checked yet.
Run the check — free, no account needed. It reads the open-access text and checks the sources it cites.
Claims other papers make about this one
Each is checked against this paper’s own text: does it say what the citing paper says it does?
Prompt engineering has emerged as a key strategy for engaging LLMs and has been shown to improve LLM responses.
“Prompt engineering has emerged as a key strategy for engaging LLMs, involving structuring queries with clear context, instructions, and expected outputs, 119 and has been shown to improve LLM responses.120”
From Large Language Models in Pharmacist-Led Direct Patient Care: A Rapid Review of Published Evaluations (2026) · cites this paper as [120]
Self-check
Percentages, sums and reported differences re-computed from the paper’s own numbers.
The self-check needs the paper’s full text.
Cites
Sweller, J., Ayres, P., & Kalyuga, S. (2011) · Springer eBooks · doi:10.1007/978-1-4419-1428-6_446 · Cited by 5,538 · see citing works
Survey of Hallucination in Natural Language Generation
Ji, Z., Lee, N., Frieske, R., Yu, T., Su, D., Xu, Y., Ishii, E., Bang, Y. J., Madotto, A., & Fung, P. (2023) · ACM Computing Surveys · doi:10.1145/3571730 · Cited by 5,025 · cited 1× · see citing works
“14,15 Detecting and mitigating hallucinations have been challenging in LLMs. Automatic detection and a benchmark of the detection of hallucinations are still not well established, and have not been widely validated in the healthcare context 16 ; human validation of hallucinations remains the gold…”
BackgroundSweller, J. (2011) · Psychology of Learning and Motivation · doi:10.1016/b978-0-12-387691-1.00002-8 · Cited by 4,856
Ayers, J. W., Poliak, A., Dredze, M., Leas, E. C., Zhu, Z., Kelley, J. B., Faix, D. J., Goodman, A. M., Longhurst, C. A., Hogarth, M., et al. (2023) · JAMA Internal Medicine · doi:10.1001/jamainternmed.2023.1838 · Cited by 2,613 · cited 3× · see citing works
“17,18 However, past studies have focused on evaluation of the GPT-generated response on clinician work-load, and only sought for clinician’s feedback, patient perspective of LLM-generated response is largely missing from the literature.”
BackgroundHow does communication heal? Pathways linking clinician–patient communication to health outcomes
Street, R. L., Makoul, G. T., Arora, N. K., & Epstein, R. M. (2009) · Patient Education and Counseling · doi:10.1016/j.pec.2008.11.015 · Cited by 2,540 · see citing works
Experimental evidence on the productivity effects of generative artificial intelligence
Noy, S., & Zhang, W. (2023) · Science · doi:10.1126/science.adh2586 · Cited by 2,150 · cited 1× · see citing works
“11 LLMs such as GPT-4 have demonstrated success with medical note-taking tasks, addressing typical questions posed on the US Medical Licensing Examination (USMLE), and answering standard “curbside consult” questions between clinician colleagues.”
BackgroundBenefits, Limits, and Risks of GPT-4 as an AI Chatbot for Medicine
Lee, P., Bubeck, S., & Petro, J. (2023) · New England Journal of Medicine · doi:10.1056/nejmsr2214184 · Cited by 1,738 · see citing works
Artificial Intelligence in Health Care: A Report From the National Academy of Medicine
Matheny, M. E., Whicher, D., & Thadaney Israni, S. (2020) · JAMA · doi:10.1001/jama.2019.21579 · Cited by 628 · see citing works
Creation and Adoption of Large Language Models in Medicine
Shah, N. H., Entwistle, D., & Pfeffer, M. A. (2023) · JAMA · doi:10.1001/jama.2023.14217 · Cited by 435 · see citing works
Tai-Seale, M., Olson, C. W., Li, J., Chan, A. S., Morikawa, C., Durbin, M., Wang, W., & Luft, H. S. (2017) · Health Affairs · doi:10.1377/hlthaff.2016.0811 · Cited by 379 · see citing works
Self-citationUllah, E., Parwani, A., Baig, M. M., & Singh, R. (2024) · Diagnostic Pathology · doi:10.1186/s13000-024-01464-7 · Cited by 281 · see citing works
Artificial Intelligence–Generated Draft Replies to Patient Inbox Messages
Garcia, P., Ma, S. P., Shah, S. J., Smith, M., Jeong, Y., Devon-Sand, A., Tai-Seale, M., Takazawa, K., Clutter, D., Vogt, K., et al. (2024) · JAMA Network Open · doi:10.1001/jamanetworkopen.2024.3201 · Cited by 257 · see citing works
Tai‐Seale, M., Dillon, E. C., Yan, Y., Nordgren, R., Steinberg, R. L., Nauenberg, T., Lee, T. C., Meehan, A. E., Li, J., Chan, A. S., et al. (2019) · Health Affairs · doi:10.1377/hlthaff.2018.05509 · Cited by 225 · see citing works
Self-citationRobertson, S. L., Robinson, M. D., & Reid, A. (2017) · Journal of Graduate Medical Education · doi:10.4300/jgme-d-16-00123.1 · Cited by 170 · see citing works
Nath, B., Williams, B., Jeffery, M. M., O’Connell, R. T., Goldstein, R. L., Sinsky, C. A., & Melnick, E. R. (2021) · JAMA Network Open · doi:10.1001/jamanetworkopen.2021.31490 · Cited by 100 · see citing works
Reddy, S. (2023) · Informatics in Medicine Unlocked · doi:10.1016/j.imu.2023.101304 · Cited by 99 · see citing works
Six ways large language models are changing healthcare
Webster, P. C. (2023) · Nature Medicine · doi:10.1038/s41591-023-02700-1 · Cited by 58 · see citing works
Using artificial intelligence to improve primary care for patients and clinicians.
Sarkar, U., & Bates, D. W. (2024) · JAMA Internal Medicine · doi:10.1001/jamainternmed.2023.7965 · Cited by 52 · see citing works
The Electronic Health Record Inbox: Recommendations for Relief
Sinsky, C. A., Shanafelt, T. D., & Ripp, J. A. (2022) · Journal of General Internal Medicine · doi:10.1007/s11606-022-07766-0 · Cited by 49 · see citing works
How to Safely Integrate Large Language Models Into Health Care
Gottlieb, S., & Silvis, L. (2023) · JAMA Health Forum · doi:10.1001/jamahealthforum.2023.3909 · Cited by 38 · see citing works
Fogg, J. F., & Sinsky, C. A. (2023) · NEJM Catalyst · doi:10.1056/cat.22.0438 · Cited by 33 · see citing works
Flagged first, then by citations
Research works printed but not linked: 2
- [16]Pal A, Umapathi LK, Sankarasubbu M. Med-HALT: medical domain hallucination test for large language models. In: Proceedings of the 27th Conference on Computational Natural Language Learning (CoNLL). Singapore: Association for Computational Linguistics; 2023: 314- 334.
- [19]White J, Fu Q, Hays S, et al A prompt pattern catalog to enhance prompt engineering with ChatGPT. arXiv; abs/230211382. 2023. Accessed February 11, 2024. https://api.semanticscholar.org/CorpusID:257079092
Cited by
Sorted by citations
Opportunities and risks of artificial intelligence in patient portal messaging in primary care
Biro, J. M., Handley, J. L., Malcolm McCurry, J., Visconti, A., Weinfeld, J., Gregory Trafton, J., & Ratwani, R. M. (2025) · npj Digital Medicine · doi:10.1038/s41746-025-01586-2 · Cited by 35 · see citing works
Large Language Models in Pharmacist-Led Direct Patient Care: A Rapid Review of Published Evaluations
Yakob, R. A., Bamgboje-Ayodele, A., Collins, J. C., & Aslani, P. (2026) · Research in Social and Administrative Pharmacy · doi:10.1016/j.sapharm.2026.09.007
- Authors
- Yan, S., Knapp, W., Leong, A., Kadkhodazadeh, S., Das, S., Jones, V. G., Clark, R., Grattendick, D., Chen, K., Hladik, L., Fagan, L., & Chan, A.
- Affiliations
- Sutter Health (US)
- Corresponding author
- Yan, Sherry
- Venue
- Journal of the American Medical Informatics Association
- Publisher
- Oxford University Press (OUP)
- Published
- 2024-07-19
- Volume
- 31
- Issue
- 10
- Pages
- 2263-2270
- ISSN
- 1067-5027 (ISSN-L)
- 1527-974X
- PMC
- PMC11413421
- OpenAlex
- W4400863680
- Cited by
- 47
- References
- 22
- Citations by year
- 2026: 17 · 2025: 27 · 2024: 3
- FWCI
- 4.40
- Type
- journal article
- Language
- en
- Open access
- hybrid
- doi.org
- Licence
- Locations
- Journal of the American Medical Informatics Association (publishedVersion, cc-by-nc-nd)
- PubMed Central (publishedVersion, cc-by-nc-nd)
- PubMed (publishedVersion)
- Topics
- Health Sciences › Medicine › Health Informatics › Artificial Intelligence in Healthcare and Education
- Health Sciences › Health Professions › Health Information Management › Electronic Health Records Systems
- Physical Sciences › Computer Science › Artificial Intelligence › Machine Learning in Healthcare
- Keywords
- prompt engineering, large language models, GPT-4, automated response generation, electronic health records, primary care providers, patient acceptance, message tone, cognitive load
- MeSH terms
- Humans, Natural Language Processing, Reminder Systems, Electronic Health Records
About these checks
Registry, retraction, Cites and statistics results are computed, not judged, with one exception: a printed reference that no index lists is read once by a model before it counts as a citation error. Claims are extracted by a model and kept only when their quote appears verbatim in the text; each cited source is then checked, with a model’s help, for whether it says what the claim relies on. Those verdicts can be wrong — read the claim’s quote and the cited source before relying on one.
Statistics and arithmetic are recomputed, not judged.
Confidence bands are shown only for fields calibrated on our annotated test set. None is calibrated yet, so no band is shown.
What counts as a claim ›How we measure confidence ›How we check this ›
Are you an author, or do you see a problem with this page? Request a review