Skip to main content
QUICK REVIEW

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

Yuhe Ke, Liyuan Jin|arXiv (Cornell University)|Jan 29, 2024
Topic ModelingComputer Science18 citations
TL;DR

This case study develops a healthcare LLM-RAG pipeline using 35 preoperative guidelines and shows RAG-enhanced GPT-4.0 achieves non-inferior accuracy to human instructions and higher than basic LLMs, with faster responses.

ABSTRACT

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.

Motivation & Objective

  • Demonstrate a healthcare-focused LLM-RAG pipeline using preoperative guidelines.
  • Evaluate the accuracy and speed of RAG-augmented LLMs against human-generated responses.
  • Assess grounded knowledge, upgradability, and scalability of the LLM-RAG approach in a medical context.

Proposed method

  • Convert clinical documents into text using LangChain and LlamaIndex-based pipelines.
  • Chunk text and embed using selected embedding models; store vectors in Pinecone with 1536-dimensions.
  • Retrieve relevant chunks via cosine similarity and generate answers with an LLM (e.g., GPT-4.0).
  • Compare LLM outputs to human-generated answers provided by junior doctors (1260 responses total).
  • Measure response time and accuracy to assess performance and non-inferiority.
  • Report ground-truth grounding, upgradability, and scalability implications for healthcare deployment.

Experimental results

Research questions

  • RQ1Can a retrieval augmented generation pipeline improve accuracy of LLMs for preoperative medical guidance?
  • RQ2How does RAG affect response speed compared with human performance?
  • RQ3Is GPT-4.0 with RAG non-inferior to human-generated instructions for preoperative guidance (statistical comparison)?

Key findings

  • GPT-4.0 basic accuracy: 80.1%.
  • GPT-4.0 with RAG accuracy: 91.4%.
  • Human-generated instruction accuracy: 86.3%.
  • GPT-4.0 with RAG shows non-inferiority to human instructions (p=0.610).
  • LLM-RAG provides faster responses (15–20 seconds) versus humans (about 10 minutes).

Read this paper

Open the full text in the Nubint reader and ask about any passage as you read.

Read this paper on Nubint

This review was generated by AI from the original paper. Please check the paper before citing it.