# MedDesert AI
### π 1st Place β MIT Hack-Nation Global AI Hackathon (Databricks Track)
**Hack Nation: Bridging Medical Deserts**
An Intelligent Document Parsing (IDP) agent that extracts, verifies, and reasons over medical facility data from Ghana to identify medical deserts and infrastructure gaps.
---
## Architecture
```
User Question
|
v
Streamlit UI ββ> LangGraph Agent Graph ββ> Databricks Free Edition
(local) (local orchestration) (remote services)
```
**LangGraph** orchestrates a multi-agent graph. Each agent node calls **Databricks** services (Genie, Vector Search, Model Serving). **MLflow** traces every step. **Streamlit** renders the frontend.
### Agent Nodes
| Node | Purpose | Databricks Service |
|------|---------|--------------------|
| **Supervisor** | Classifies intent, routes to correct agent | Model Serving (LLM) |
| **SQL Agent** | Structured queries (counts, aggregations) | Genie (Text-to-SQL) |
| **RAG Agent** | Semantic search over facility descriptions | Vector Search |
| **IDP Extraction** | Extracts structured facts from free-form text | Model Serving (LLM) |
| **Medical Reasoning** | Anomaly detection, plausibility checks | Model Serving (LLM) |
| **Geospatial** | Distance queries, medical desert detection | Local (Haversine) + SQL |
| **Synthesis** | Merges results into cited Markdown answer | Model Serving (LLM) |
---
## Prerequisites
- **Python 3.13+** (managed via `pyenv` β see `.python-version`)
- **Databricks Free Edition** account with:
- A SQL Warehouse (auto-provisioned on Free Edition)
- A Personal Access Token (PAT)
- **Git**
---
## Quick Start
### 1. Clone and set up Python environment
```bash
git clone
github.com
cd Hack-Nation
# If using pyenv (recommended)
pyenv install 3.13.4
pyenv local 3.13.4
# Create virtual environment
python -m venv .venv
source .venv/bin/activate # macOS/Linux
# .venv\Scripts\activate # Windows
pip install -r requirements.txt
``` β¦