Development of an Artificial Intelligence RAG Chatbot for Use as a Surgical Reference Tool
Penn collection
Degree type
Discipline
Medical Sciences
Education
Subject
Surgery
Funder
Grant number
Copyright date
Distributor
Related resources
Author
Contributor
Abstract
The purpose of this study was to find a viable way to launch an application that uses artificial intelligence as well as documents to answer common questions medical students may have while learning about airway surgical procedures. Artificial intelligence (AI) and large language models (LLMs) have become increasingly viable as a method of learning and studying. One way to integrate AI is through retrieval augmented generation (RAG), which allows developers to input data that the LLM should use as a reference when answering an end user’s prompt. The application base code was all in the Python language, along with the LangChain library for integration of the OpenAI LLM and Streamlit library for hosting of the web app. The Pinecone website and library were used for the vector database to store and retrieve embedding information. After uploading PDFs on Cricothyroidotomy, Tracheostomy, and Airway Management in Trauma, the RAG-enabled chatbot was able to return viable information regarding these operations. Using built-in prompt editing, reference information was also provided with each answer. This project was the first iteration of a minimum viable product. In the future, the lab hopes to build from findings to develop a desktop application with AI RAG integration that searches a vast database of approved resources including but not limited to videos, anatomy models, and textbooks.