{"id":22457441,"url":"https://github.com/anshulranjan2004/medichat-agentic-assistant","last_synced_at":"2026-05-13T07:04:12.414Z","repository":{"id":266737374,"uuid":"899203887","full_name":"AnshulRanjan2004/MediChat-Agentic-Assistant","owner":"AnshulRanjan2004","description":"An agentic LLM-powered chatbot leveraging RAG to provide real-time insights, personalized assistance, and streamlined workflows using live pharmaceutical data.","archived":false,"fork":false,"pushed_at":"2024-12-05T21:20:27.000Z","size":52523,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-02-01T18:12:14.637Z","etag":null,"topics":["agentic-workflow","chatbot","langchain-python","llama3","llm","rag","vectordb"],"latest_commit_sha":null,"homepage":"","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/AnshulRanjan2004.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2024-12-05T20:12:10.000Z","updated_at":"2024-12-08T15:42:23.000Z","dependencies_parsed_at":"2024-12-05T21:35:26.924Z","dependency_job_id":null,"html_url":"https://github.com/AnshulRanjan2004/MediChat-Agentic-Assistant","commit_stats":null,"previous_names":["anshulranjan2004/medichat-agentic-assistant"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/AnshulRanjan2004%2FMediChat-Agentic-Assistant","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/AnshulRanjan2004%2FMediChat-Agentic-Assistant/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/AnshulRanjan2004%2FMediChat-Agentic-Assistant/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/AnshulRanjan2004%2FMediChat-Agentic-Assistant/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/AnshulRanjan2004","download_url":"https://codeload.github.com/AnshulRanjan2004/MediChat-Agentic-Assistant/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":245855830,"owners_count":20683590,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["agentic-workflow","chatbot","langchain-python","llama3","llm","rag","vectordb"],"created_at":"2024-12-06T08:07:32.570Z","updated_at":"2026-05-13T07:04:12.363Z","avatar_url":"https://github.com/AnshulRanjan2004.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# MediChat-Agentic-Assistant\n\n\u003cimg height=\"300\" width=\"400\" alt=\"logog\" src=\"logo.png\"\u003e\n\n## Overview\n**MediChat** is an intelligent, LLM-powered chatbot designed to provide real-time insights, personalized assistance, and streamlined workflows in the pharmaceutical and healthcare domains. It leverages **Retrieval-Augmented Generation (RAG)**, **OpenAI embeddings**, and **Llama-3.2-3b-Instruct** to help healthcare professionals retrieve actionable insights, drug alternatives, and safety measures efficiently.\n\n## Features\n- **RAG-based Question Answering**: Accurate, context-aware responses to medical queries.\n- **Personalized Recommendations**: Suggests appropriate treatment options and drug alternatives.\n- **Summarization**: Generates concise summaries of drug information, treatments, and medical procedures.\n- **Web Search Integration**: Retrieves real-time data from the web for up-to-date information.\n\n## Architecture\nThe system follows an **Agent-Based Architecture** that orchestrates the interaction between different modules based on the user's query.\n\n![image](https://github.com/user-attachments/assets/a6086954-b646-4493-ae66-3cc0728a66c6)\n\n### Key Components:\n1. **Input UI**: Accepts user input and sends it to the Agent.\n2. **Agent**: Decides which module to invoke (Summarizer, QnA, Recommender) based on the query’s intent.\n3. **Vector Store**: Uses **ChromaDB** to store document embeddings and perform semantic search.\n4. **Modules**:\n   - **Web Search**: Fetches additional context and alternatives from the web using **DuckDuckGo**.\n   - **RAG**: Combines document retrieval and LLM generation for question answering.\n   - **Summarizer**: Provides concise summaries of relevant documents.\n   - **Recommender**: Suggests drug alternatives and treatment recommendations.\n\n## Installation\n\n### Requirements\n- Python 3.x\n- Required Python libraries:\n  - `LangChain`\n  - `LangGraph`\n  - `ChromaDB`\n  - `Streamlit`\n  - `DuckDuckGo search`\n  - `OpenAI` (for embeddings)\n\n### Setup Instructions\n\n1. **Clone the repository**:\n   ```bash\n   git clone https://github.com/AnshulRanjan2004/MediChat-Agentic-Assistant.git\n   cd MediChat-Agentic-Assistant\n   ```\n\n2. **Install the required dependencies**:\n   ```bash\n    pip install -r requirements.txt\n   ```\n\n3. **Run the application**:\n    ```bash\n    streamlit run app.py\n    ```\n\n## Modules\n\n1. **RAG Application for Question Answering**\n    - Utilizes LangChain to process and retrieve relevant documents, followed by generation of context-aware answers using the Llama-3.2-3b-Instruct model.\n2. **Recommender**\n    - Uses semantic search via OpenAI embeddings and ChromaDB to suggest personalized drug alternatives and treatment options.\n3. **Alternatives Generator**\n    - Integrates DuckDuckGo search to fetch real-time information about alternative treatments or drugs and generate suggestions.\n4. **Summarizer**\n    - Generates concise summaries of drug, treatment, or medical procedure information using custom prompts and LLM-based generation.\n5. **Agent-Based Framework**\n    - The Agent interprets the user query and routes it to the relevant module (e.g., Summarizer, QnA, Recommender) for processing.\n\n## Usage\n1. Open the Streamlit app interface.\n2. Type a query (e.g., \"What are the alternatives for aspirin?\" or \"Summarize drug interactions for X\").\n3. The system will process your query, retrieve the relevant data, and provide insights through the UI.\n\n## Specifications\n- **Language Model**: Llama-3.2-3b-Instruct running locally on LM Studio.\n- **Backend**: LangChain, LangGraph, ChromaDB for vector storage and retrieval.\n- **Web Search**: DuckDuckGo integration for real-time data.\n- **Frontend**: Streamlit with custom sidebar and agent interactions.\n\n## Demo\nWatch the demo video to see the MediChat in action:\n\nhttps://github.com/user-attachments/assets/6dcfc062-cea0-4fc0-8a97-7f04c1405f24\n\n## Contributing\nFeel free to fork the repository, raise issues, or contribute improvements via pull requests.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fanshulranjan2004%2Fmedichat-agentic-assistant","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fanshulranjan2004%2Fmedichat-agentic-assistant","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fanshulranjan2004%2Fmedichat-agentic-assistant/lists"}