metadata
title: MediQuery Healthcare AI
emoji: π₯
colorFrom: blue
colorTo: indigo
sdk: docker
pinned: false
app_port: 8501
π₯ Explainable Healthcare QA Chatbot
An intelligent medical question-answering system combining LLM + RAG + XAI.
Quick Start
# Setup
python -m venv venv
source venv/bin/activate
pip install -r requirements.txt
# Download data
python scripts/download_data.py
# Build knowledge base
python scripts/build_knowledge_base.py
# Run API
python api/main.py
# Run Frontend
streamlit run frontend/streamlit_app.py
Architecture
- Retrieval: Hybrid dense (MedCPT) + sparse (BM25) search
- Generation: Fine-tuned BioMistral-7B with QLoRA
- Explainability: Confidence scoring, source attribution, rationale generation
Project Structure
healthcare_qa_chatbot/
βββ src/ # Source code
βββ api/ # FastAPI backend
βββ frontend/ # Streamlit UI
βββ data/ # Datasets and knowledge base
βββ models/ # Trained models
βββ tests/ # Test suite
Components
| Component | Technology |
|---|---|
| LLM | BioMistral-7B |
| Embeddings | MedCPT / all-MiniLM |
| Vector Store | ChromaDB |
| API | FastAPI |
| Frontend | Streamlit |
Success Metrics
- Retrieval: Recall@10 > 85%
- Medical Accuracy: > 90%
- Response Time: < 10s
- Safety: < 5% hallucination rate
License
MIT License - For educational purposes only.
Disclaimer
β οΈ This is an educational project. The information provided by this system is NOT a substitute for professional medical advice, diagnosis, or treatment. Always consult a qualified healthcare provider.