Development and Testing of Retrieval Augmented Generation in Large Language Models -- A Case Study Report

📄 arXiv: 2402.01733v1 📥 PDF

作者: YuHe 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, Daniel Shu Wei Ting

分类: cs.CL, cs.AI

发布日期: 2024-01-29

备注: NA


💡 一句话要点

提出基于检索增强生成的医疗领域大语言模型应用方案

🎯 匹配领域: 支柱九:具身大模型 (Embodied Foundation Models)

关键词: 大语言模型 检索增强生成 医疗应用 术前医学 临床决策支持 模型评估 人工智能

📋 核心要点

  1. 现有的医疗知识获取方法效率低,人工生成响应通常需要较长时间,限制了临床决策的及时性。
  2. 本研究提出了一种基于检索增强生成的LLM-RAG模型,旨在快速生成高质量的医疗响应,提升临床决策效率。
  3. 实验结果表明,RAG增强后的GPT4.0模型在响应时间和准确性上均优于人类医生,展示了其在医疗领域的应用潜力。

📝 摘要(中文)

本研究旨在探讨大语言模型(LLMs)在医疗应用中的潜力,特别是检索增强生成(RAG)方法在术前医学中的定制化应用。通过开发一个LLM-RAG模型,利用35条术前指南进行测试,评估了1260个生成响应的准确性。结果显示,RAG增强后的GPT4.0模型在准确性上达到了91.4%,显著优于人类生成的86.3%。该研究展示了LLM-RAG模型在医疗领域的可行性及其在知识基础、可升级性和可扩展性方面的优势。

🔬 方法详解

问题定义:本研究旨在解决医疗领域中,传统知识获取方法效率低下的问题,尤其是在术前医学中,人工生成响应的时间过长,影响临床决策的及时性。

核心思路:论文提出的LLM-RAG模型通过结合检索增强生成技术,能够快速生成基于临床指南的高质量响应,从而提高医疗决策的效率与准确性。

技术框架:整体架构包括数据预处理、文本嵌入、向量存储和生成响应四个主要模块。首先,将临床文档转换为文本,然后进行分块处理以便嵌入和检索,最后生成响应。

关键创新:该研究的关键创新在于将RAG方法与大语言模型结合,显著提升了生成响应的准确性和速度,尤其是在医疗领域的应用中,展示了其独特的优势。

关键设计:在技术细节上,使用了Pinecone进行向量存储,维度为1536,并采用余弦相似度作为损失度量,确保了高效的检索性能。

📊 实验亮点

实验结果显示,LLM-RAG模型在生成响应的速度上平均为15-20秒,远快于人类医生的10分钟。同时,GPT4.0模型的准确性从80.1%提升至91.4%,与人类生成的86.3%相比,表现出非劣性(p=0.610)。

🎯 应用场景

该研究的LLM-RAG模型可广泛应用于医疗领域,尤其是在术前医学中,能够为医生提供快速、准确的决策支持。其潜在价值在于提高医疗服务的效率和质量,未来可能推动更多基于AI的医疗应用落地。

📄 摘要(原文)

Purpose: Large Language Models (LLMs) hold significant promise for medical applications. Retrieval Augmented Generation (RAG) emerges as a promising approach for customizing domain knowledge in LLMs. This case study presents the development and evaluation of an LLM-RAG pipeline tailored for healthcare, focusing specifically on preoperative medicine. Methods: We developed an LLM-RAG model using 35 preoperative guidelines and tested it against human-generated responses, with a total of 1260 responses evaluated. The RAG process involved converting clinical documents into text using Python-based frameworks like LangChain and Llamaindex, and processing these texts into chunks for embedding and retrieval. Vector storage techniques and selected embedding models to optimize data retrieval, using Pinecone for vector storage with a dimensionality of 1536 and cosine similarity for loss metrics. Human-generated answers, provided by junior doctors, were used as a comparison. Results: The LLM-RAG model generated answers within an average of 15-20 seconds, significantly faster than the 10 minutes typically required by humans. Among the basic LLMs, GPT4.0 exhibited the best accuracy of 80.1%. This accuracy was further increased to 91.4% when the model was enhanced with RAG. Compared to the human-generated instructions, which had an accuracy of 86.3%, the performance of the GPT4.0 RAG model demonstrated non-inferiority (p=0.610). Conclusions: In this case study, we demonstrated a LLM-RAG model for healthcare implementation. The pipeline shows the advantages of grounded knowledge, upgradability, and scalability as important aspects of healthcare LLM deployment.