Giter Club home page Giter Club logo

puja-urmi / medical-chatbot-llm-rag Goto Github PK

View Code? Open in Web Editor NEW
0.0 0.0 1.0 74 KB

This repository contains the code for a chatbot that utilizes a large language model with retrieval-augmented generation (RAG), trained on reliable medical datasets from PubMed. The chatbot achieves 96.7% context precision, 95% context recall, 85% faithfulness, 73% answer relevancy, and 69.4% answer correctness in its responses.

Jupyter Notebook 100.00%

medical-chatbot-llm-rag's Introduction

Medical Chatbot: MedBot

MedBot is an innovative healthcare chatbot project that leverages large Language Models along with Retrieval-Augmented Generation (RAG) from trusted databases created from PubMed datasets to facilitate seamless and intuitive communication in the realm of medical assistance. Designed to enhance the interaction between users and healthcare information, MedBot offers immediate responses to inquiries related to health, wellness, and medical queries. This intelligent chatbot employs RAG, natural language processing, and understanding to provide accurate and personalized responses, making it a reliable companion for individuals seeking information on symptoms, medications, and general healthcare advice. MedBot aims to bridge the gap between users and healthcare knowledge, offering a convenient and accessible platform for health-related conversations.

Project Overview

This project utilizes Large Language Models with Retrieval-Augmented Generation (RAG), trained on reliable medical datasets collected from PubMed. The bot demonstrates impressive performance metrics, including:

96.7% Content Precision 95% Context Recall 85% Faithfulness 73% Answer Relevancy 69.4% Answer Correctness

Screen Shot 2024-05-29 at 12 30 15 PM

Example Responses

Screen Shot 2024-05-29 at 12 28 17 PM

Notebook Breakdown of 'MedBot.ipynb':

Importing Required Resources including Data

Identifying and bringing in all necessary tools and resources required for the project, including programming languages, machine learning frameworks, data collection tools, and other dependencies. Collecting and preparing data relevant to the project, including data cleaning, preprocessing, and structuring the data in a format suitable for analysis or modeling.

Creating a Vector Database Using Only the Contexts

Transforming the collected data into numerical vectors while preserving semantic meaning, typically using word embedding models or contextual embedding models to represent words or sentences as dense vectors.

Testing the Vector Database:

Validating the effectiveness of the vector database by querying it with known inputs and verifying that the retrieved vectors match expectations.

Testing the Vector Database with Paraphrased Questions

Assessing the robustness of the vector database to handle paraphrased queries and verifying its ability to accurately retrieve relevant vectors even when the query is rephrased or expressed differently.

Creating the Retrieval-Augmented Generation (RAG) Pipeline Using LANGCHAIN

Building a pipeline that integrates retrieval and generation techniques using LANGCHAIN, based on the vector database.

Evaluating the RAG Pipeline Using RAGAS

Assessing the effectiveness of the RAG pipeline in generating relevant responses to queries using RAGAS (Retrieval Augmented Generation Assessment Suite) or a similar evaluation framework.

Performance Measures and Evaluation

Calculating various metrics to assess the efficiency and effectiveness of the RAG pipeline, including faithfulness, context precision, context recall, answer similarity, answer relevancy, and answer correctness. Summarizing and analyzing the evaluation results, highlighting the performance of the RAG pipeline based on the calculated metrics.

medical-chatbot-llm-rag's People

Contributors

puja-urmi avatar

medical-chatbot-llm-rag's Issues

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.