Developing a Retrieval Augmented Generation (RAG) Chatbot App Using Adaptive Large Language Models (LLM) and LangChain Framework

Authors

DOI:

https://doi.org/10.55632/pwvas.v96i1.1068

Abstract

CARA BURGAN, Dept of Computer Sciences, Mathematics, and Engineering, Shepherd University, Shepherdstown, WV, 25443, JOSIAH KOWALSKI, Dept of Computer Sciences, Mathematics, and Engineering, Shepherd University, Shepherdstown, WV, 25443, and WEIDONG LIAO (Faculty Advisor), Dept of Computer Sciences, Mathematics, and Engineering, Shepherd University, Shepherdstown, WV, 25443.  Developing a Retrieval Augmented Generation (RAG) Chatbot App Using Adaptive Large Language Models (LLM) and LangChain Framework 

 RamChat is an AI chatbot designed to assist Shepherd University students in navigating the student handbook. Developed in Python, it utilizes both API-based and local Large Language Models (LLMs) for natural language processing (NLP), alongside a vector store system. Our aim is to create a high-quality chatbot app tailored for student use.

We began by researching existing chatbot platforms and created a vector store with embeddings from OpenAI's text-embedding-3-small model, trained on the Shepherd University handbook. Testing each LLM helped assess answer types and accuracy.

Development involved debugging and optimizing RamChat's code, including replacing OpenAI's davinci-002 model with gemma, a local LLM based on Google's Gemini model. Ollama framework aids in automatic LLM selection based on user prompts.

Our conference presentation will detail RamChat's development, methodology, challenges, and insights. RamChat represents an innovative application of AI to enhance the Shepherd University student experience.

Author Biography

Weidong Liao, Shepherd University

Associate Professor of Computer and Information Sciences

References

Josiah Kowalski, Annalee Corcoran, Skylar Reuschel, Thomas Worley, Exploring LangChain for Generative Applications in Education, Shepherd University Fall 2023 Undergraduate Capstone Project. Dec. 2023.

Published

2024-04-18

How to Cite

Burgan, C., Kowalski, J., & Liao, W. (2024). Developing a Retrieval Augmented Generation (RAG) Chatbot App Using Adaptive Large Language Models (LLM) and LangChain Framework. Proceedings of the West Virginia Academy of Science, 96(1). https://doi.org/10.55632/pwvas.v96i1.1068

Issue

Section

Meeting Abstracts-Poster