Skip to content

ArindamDatta1994/Medicaid_AI_Assistant

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

1 Commit
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

🏥 MediGuide AI — Medicaid Intelligence Assistant

A production-grade AI assistant for Medicaid domain knowledge, built with LangChain, LangGraph, and RAG (Retrieval-Augmented Generation). Powered by Groq for ultra-fast inference.


🏗️ Architecture Overview

User Query
    │
    ▼
┌─────────────────────────────────┐
│     LangGraph Orchestrator      │  ← Stateful multi-agent workflow
│  ┌──────────┐  ┌─────────────┐  │
│  │  Router  │→ │  RAG Agent  │  │  ← Retrieves Medicaid documents
│  │  Node    │  │             │  │
│  └──────────┘  └─────────────┘  │
│       │        ┌─────────────┐  │
│       └──────→ │  Policy     │  │  ← Answers policy questions
│                │  Agent      │  │
│                └─────────────┘  │
│       │        ┌─────────────┐  │
│       └──────→ │  Eligibility│  │  ← Checks eligibility criteria
│                │  Agent      │  │
│                └─────────────┘  │
│                ┌─────────────┐  │
│                │  Summarizer │  │  ← Final answer synthesis
│                │  Node       │  │
│                └─────────────┘  │
└─────────────────────────────────┘
    │
    ▼
 Response to User

🧩 Key Components

Component Technology Purpose
RAG Pipeline LangChain + ChromaDB Retrieve relevant Medicaid docs
Graph Orchestration LangGraph Route queries to the right agent
LLM Inference Groq (Llama 3.1) Fast, free inference
Embeddings HuggingFace (local) Encode documents + queries
Vector Store ChromaDB Store/search document chunks
CLI Interface Rich (Python) Beautiful terminal UI

📁 Project Structure

medicaid-ai-assistant/
├── config/
│   └── settings.py          # All configuration (API keys, model names, paths)
├── data/
│   └── documents/           # Medicaid PDF/text documents go here
├── src/
│   ├── rag/
│   │   ├── document_loader.py   # Load & chunk Medicaid documents
│   │   ├── embeddings.py        # HuggingFace embedding setup
│   │   └── vector_store.py      # ChromaDB setup & retrieval
│   ├── chains/
│   │   ├── rag_chain.py         # LangChain RAG chain
│   │   └── qa_chain.py          # Question-Answer chain
│   ├── agents/
│   │   ├── rag_agent.py         # Retrieval-augmented agent
│   │   ├── policy_agent.py      # Medicaid policy specialist
│   │   └── eligibility_agent.py # Eligibility checker agent
│   ├── graph/
│   │   ├── state.py             # LangGraph state schema
│   │   ├── nodes.py             # All graph node functions
│   │   └── workflow.py          # LangGraph workflow builder
│   ├── tools/
│   │   └── medicaid_tools.py    # Custom LangChain tools
│   └── utils/
│       ├── prompts.py           # All prompt templates
│       └── helpers.py           # Utility functions
├── tests/
│   ├── test_rag.py
│   └── test_graph.py
├── main.py                  # Entry point — CLI chatbot
├── ingest.py                # Document ingestion script
├── requirements.txt
└── .env.example

🚀 Quick Start

1. Clone & Install

git clone <your-repo>
cd medicaid-ai-assistant
python -m venv venv
source venv/bin/activate  # Windows: venv\Scripts\activate
pip install -r requirements.txt

2. Set Environment Variables

cp .env.example .env
# Edit .env and add your GROQ_API_KEY

3. Ingest Documents

python ingest.py

4. Run the Assistant

python main.py

💡 Example Queries

  • "What are the income limits for Medicaid eligibility in 2024?"
  • "Does Medicaid cover dental care for adults?"
  • "What is the difference between Medicaid and Medicare?"
  • "How do I apply for Medicaid if I just lost my job?"
  • "What is a Medicaid waiver program?"

🔧 Extending the Project

  • Add more documents to data/documents/ and re-run ingest.py
  • Add new agents in src/agents/ and wire them into the graph
  • Add new tools in src/tools/medicaid_tools.py
  • Swap ChromaDB for Pinecone/Weaviate for production scale

About

This is a multi-agent Medicaid assistant that routes every user question through an intelligent LangGraph workflow — choosing the right specialist agent based on what was asked.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages