Medicompanion RAG Application: Transforming Healthcare Information Delivery
π€π Medicompanion RAG Application: Transforming Healthcare Information Delivery
In todayβs healthcare landscape, accurate information is paramount. Medicompanion is a cutting-edge Retrieval-Augmented Generation (RAG) application designed to deliver reliable health and fitness supplement information. This blog details the project setup, architecture, and the seamless user experience Medicompanion offers through advanced conversational AI built with LangChain and the LLaMA 3.2 model.
π― Project Overview
Medicompanion utilizes RAG and LLaMA 3.2 to answer health-related questions by retrieving relevant documents and generating conversational responses, ensuring clarity and relevance. With the focus on gym and health supplements, itβs an ideal tool for those looking to make informed decisions regarding their wellness routines.
π Directory Structure
A well-organized directory structure is key to managing the project efficiently. Below is the breakdown of Medicompanionβs directory:
1
2
3
4
5
6
7
8
9
10
11
12
13
MediCompanion
βββ README.md # Project documentation
βββ main.py # Main application entry point
βββ chat_model.py # Core chat model implementation
βββ config.py # Configuration settings
βββ document_loader.py # Document loading and preprocessing
βββ rag-datasets/ # Folder for datasets
β βββ gym supplements # Gym supplements documents
β βββ health supplements # Health supplements documents
βββ resources/ # Resources for output examples
βββ retriever.py # Document retrieval functions
βββ text_splitter.py # Splits text for efficient processing
βββ vector_store.py # Embeddings storage for quick retrieval
Key Files
- main.py: Launches the Medicompanion chatbot application.
- chat_model.py: Implements the LLaMA model, enabling natural, responsive interactions.
- document_loader.py: Loads and processes health-related documents.
- resources/: Contains example outputs and images for easy reference.
π§ Getting Started
To set up the Medicompanion application, clone the repository and install the necessary dependencies.
1
2
3
git clone https://github.com/AbhijitMore/MediCompanion.git
cd MediCompanion
pip install -U langchain-community faiss-cpu langchain-huggingface pymupdf langchain-ollama python-dotenv
After installing dependencies, start the chatbot application by running:
1
python main.py
This will initialize the Medicompanion chatbot, allowing users to ask questions related to health supplements and receive informative responses.
π Datasets
Medicompanion leverages categorized documents located in rag-datasets/
. These datasets, covering gym and health supplements, help the chatbot provide reliable, accurate responses by storing embeddings that facilitate quick retrieval during conversations.
π Application Performance & Features
Interactive Responses
Once started, the Medicompanion application provides real-time responses based on user queries, drawing from its database of health and supplement documents. Responses can include side effects, benefits, and usage guidelines for various supplements.
π Results & Performance
Throughout its operation, Medicompanion outputs relevant response:
- Console Output: Records of real-time chat outputs, providing insights into user interactions.
π€ Contributions
Contributions are warmly welcomed! Whether youβre interested in enhancing features, refining responses, or adding new datasets, all efforts are appreciated. Fork the repository and submit a pull request to join in on advancing healthcare AI applications with Medicompanion.