Healthcare.gov Plan Q&A Demo
Asks your HCGov FastAPI (/v1/ask) and shows the answer.
🔍 What’s happening behind the scenes
This demo connects a custom Python FastAPI service to structured Healthcare.gov plan data and large language models.
When you click Ask, the system performs the following steps:
1) Plan data ingestion (offline)
Healthcare.gov plan documents are collected and processed ahead of time:
- Summary of Benefits (SBC) PDFs
- Drug formularies
- Plan brochures
These documents are:
- Parsed into structured JSON
- Chunked into small, searchable excerpts
- Stored in PostgreSQL with vector embeddings
- Scored using a configurable weighted ranking system
This allows the system to reason over real plan documents — not summaries or guesses.
2) Plan ranking (deterministic)
Before any AI is involved, plans are ranked using a transparent scoring model.
The ranking system:
- Penalizes high deductibles and out-of-pocket maximums
- Penalizes missing or unclear benefits
- Can be tuned for different health profiles (e.g. diabetes, cardiac risk, prenatal care)
This step ensures the AI only looks at the most relevant plans.
3) Retrieval (RAG mode)
When a question is asked:
- The system searches the top-ranked plans
- Relevant document excerpts are retrieved
- Only those excerpts are passed to the language model
The AI cannot use outside knowledge — it answers strictly from cited plan text.
4) Answer generation with citations
The response you see is:
- Generated from real plan excerpts
- Grouped by plan ID
- Cited down to the exact PDF and page number
- Explicit about differences between plans
If the answer varies by plan, the system will say:
“It depends by plan.”
If the information is not present, it will say so.
5) Why this matters
Most plan comparison tools:
- Hide their scoring logic
- Don’t show citations
- Can’t answer nuanced questions
This demo is built to show:
- Transparency
- Auditability
- Custom health-specific decision making
It’s a foundation for user-defined weighting, personalized recommendations, and explainable AI in healthcare plan selection.
⚠️ Important note
This is an experimental demo, not medical or financial advice.
Always verify coverage details with the insurer.