Retrieval augmented generation for 10 large language models and its generalizability in assessing medical fitness - Yu He Ke; Liyuan Jin; Kabilan Elangovan; Hairil Rizal Abdullah; Nan Liu; Alex Tiong Heng Sia; Chai Rick Soh; Joshua Yi Min Tung; Jasmine Chiat Ling Ong; Chang-Fu Kuo; Shao-Chun Wu; Vesela P. Kovacheva; et al. (npj Digital Medicine)
Abstract Large Language Models (LLMs) hold promise for medical applications but often lack domain-specific expertise. Retrieval Augmented Generation (RAG) enables customization by integrating specialized knowledge. This study assessed the accuracy, consistency, and safety of LLM-RAG models in determining surgical fitness and delivering preoperative instructions using 35 local and 23 international guidelines. Ten LLMs (e.g., GPT3.5, GPT4, GPT4o, Gemini, Llama2, and Llama3, Claude) were tested across 14 clinical scenarios. A total of 3234 responses were generated and compared to 448 human-generated answers. The GPT4 LLM-RAG model with international guidelines generated answers within 20 s and achieved the highest accuracy, which was significantly better than human-generated responses (96.4% vs. 86.6%, p = 0.016). Additionally, the model exhibited an absence of hallucinations and produced more consistent output than humans. This study underscores the potential of GPT-4-based LLM-RAG models to deliver highly accurate, efficient, and consistent preoperative assessments.