npj Digital Medicine (Feb 2024)

Prompt engineering in consistency and reliability with the evidence-based guideline for LLMs

  • Li Wang,
  • Xi Chen,
  • XiangWen Deng,
  • Hao Wen,
  • MingKe You,
  • WeiZhi Liu,
  • Qi Li,
  • Jian Li

DOI
https://doi.org/10.1038/s41746-024-01029-4
Journal volume & issue
Vol. 7, no. 1
pp. 1 – 9

Abstract

Read online

Abstract The use of large language models (LLMs) in clinical medicine is currently thriving. Effectively transferring LLMs’ pertinent theoretical knowledge from computer science to their application in clinical medicine is crucial. Prompt engineering has shown potential as an effective method in this regard. To explore the application of prompt engineering in LLMs and to examine the reliability of LLMs, different styles of prompts were designed and used to ask different LLMs about their agreement with the American Academy of Orthopedic Surgeons (AAOS) osteoarthritis (OA) evidence-based guidelines. Each question was asked 5 times. We compared the consistency of the findings with guidelines across different evidence levels for different prompts and assessed the reliability of different prompts by asking the same question 5 times. gpt-4-Web with ROT prompting had the highest overall consistency (62.9%) and a significant performance for strong recommendations, with a total consistency of 77.5%. The reliability of the different LLMs for different prompts was not stable (Fleiss kappa ranged from −0.002 to 0.984). This study revealed that different prompts had variable effects across various models, and the gpt-4-Web with ROT prompt was the most consistent. An appropriate prompt could improve the accuracy of responses to professional medical questions.