1
Developing an interactive chatbot leveraging large language models using fastapi and langchain | |
Author | Deepak, Kasyapa Sai |
Call Number | AIT RSPR no.CS-23-04 |
Subject(s) | Natural language processing (Computer science) Human-computer interaction Automatic speech recognition |
Note | A research study submitted in partial fulfillment of the requirements for the degree of Master of Engineering in Computer Science |
Publisher | Asian Institute of Technology |
Abstract | Nowadays, Chatbots are widely used across various domains such as customer service, e-commerce, healthcare and banking. Chatbots play an important role in enhancing user satisfaction and optimizing the work productivity. Since the various benefits of chatbots, It is crucial to develop a chatbot for domain specific tasks and make them easily acces sible to customers. Large Language Models (LLMs) provide an innovative approach in constructing chatbots that can engage in natural and adaptable conversations with users, seamlessly handling information inquiries. While this marks an exciting advancement, it is essential to acknowledge that these models have certain drawbacks. In this study, I pro pose an approach to create an efficient chatbot that addresses the limitations associated with relying solely on Large language models (LLMs). By incorporating retrieval-based language models, we tackle prevalent issues in chatbot functionality, aiming for a more nuanced and contextually aware system. In this research, we initially gathered and segmented data, subsequently employing an embedding model to generate dense representations.The enriched data was efficiently stored in Faiss, optimizing retrieval processes. This study compared fastchat-t5-3b, llama-2-7b, alpaca-2-7b, open AI’s gpt 3.5-turbo-instruct and observed that the fastchat T5-3b model outperforms the other LLMs across various criteria such as Relevance, fluency, coherence, factuality, and total score Through systematic experimentation with various retrievers, we adopted an ensemble approach that integrates faiss,bm25 retriever and embedding-based methodologies, lever aging the strengths of each for enhanced efficiency. Our comprehensive evaluation, en compassing embedding distance, labeled score string, and string distance metrics, re vealed the superior performance of the ensemble retriever over base models. This strategic integration of advanced language models with retrieval generation aims to overcome existing limitations, paving the way for a more sophisticated and natural question-answering chatbot. The ultimate goal is to elevate the chatbot experience, mak ing interactions more akin to human conversations. |
Year | 2023 |
Type | Research Study Project Report (RSPR) |
School | School of Engineering and Technology |
Department | Department of Information and Communications Technologies (DICT) |
Academic Program/FoS | Computer Science (CS) |
Chairperson(s) | Chaklam Silpasuwanchai |
Examination Committee(s) | Tripathi, Nitin Kumar;Attaphongse Taparugssanagorn |
Scholarship Donor(s) | AIT Scholarships |
Degree | Research Studies Project Report (M. Eng.) - Asian Institute of Technology, 2023 |