Inspiration

Around the world, billions of people face two barriers at once when something feels wrong with their health: they can't get a clear, trustworthy answer, and they don't know where to go for care. Health information online is written for clinicians, not patients — buried in jargon, ads, and contradictory advice — and the language barrier makes it worse. In countries like India, the gap is sharpest: world-class hospitals and specialists exist, but people often have no easy way to know which facility near them can actually treat their problem.

We wanted to close both gaps in one place. Working from the hackathon's dataset of thousands of medical facilities across India — with their specialties, capacity, and locations — we built LuxHealth: a calm, plain-language assistant that answers your health question in your language and at your reading level, cites a source you can trust, and then points you to real, nearby facilities ranked by distance and the number of doctors who can help. Understanding and access — for good.

What it does

LuxHealth is an agentic health-literacy and care-navigation app. You ask a question in plain English or Spanish — "I think I broke my arm" — and LuxHealth:

Answers in plain language at the reading level you choose (Grade 6 → clinical), with every claim cited to a trusted public-health source (CDC, MedlinePlus). If the sources don't cover it, it says so instead of guessing. Catches emergencies first — a deterministic guardrail scans for red-flag phrases ("chest pain", "trouble breathing", "overdose") and returns a 911 prompt before any model runs. Remembers the conversation (up to 10 turns), so natural follow-ups like "is that the same as a fasting glucose test?" just work. Connects you to real care in India — it reads your symptom, infers the relevant specialty, and recommends nearby facilities from a directory of ~10,000 Indian medical facilities, ranked by a blend of distance (geocoded from your city or PIN code, using a 19,000-entry India PIN-code directory) and the number of doctors who can treat you. Shows a stewardship dashboard — live question volume, grounded-answer rate, language/reading-level splits, and flagged ungrounded answers for quality review.

How we built it

LuxHealth is built end-to-end on the three required Databricks technologies:

Databricks Apps — a multi-page Streamlit app (Patient Intake, Dashboard, Profile) with a shared theme. Agent — a deployed Mosaic AI Agent Framework ChatAgent doing retrieval-augmented generation: it retrieves top-k passages from a Vector Search index (CDC + MedlinePlus chunked, databricks-gte-large-en embeddings), then grounds an answer with a Databricks Foundation Model under a strict "cite or refuse" prompt, returning text + citations. Lakebase (serverless Postgres) — user profiles, conversation history, analytics, and the facility-finder tables (Virtue Foundation facilities + an India PIN-code directory for geocoding). Auth is OAuth throughout — no passwords or PATs; the Postgres password is a short-lived token minted and rotated at runtime. We ingested public datasets via pipelines (CDC Content Syndication API, MedlinePlus XML) and the hackathon Virtue Foundation + PIN-code datasets via Delta Sharing into Lakebase.

Challenges we ran into

The managed Knowledge Assistant isn't on Databricks Free Edition (mandated by the hackathon), so we rebuilt the agent from scratch as a deployed Agent Framework ChatAgent with our own RAG pipeline. Foundation-model rate limits — Claude and Gemini are throttled to 0 on Free Edition, so we re-grounded the agent on databricks-llama-4-maverick. Service-principal → Lakebase auth — SPs aren't auto-provisioned as Postgres roles; we had to register the SP as an instance role, attach a Lakebase resource, and grant schema access. Stale pooled connections dropped with SSL SYSCALL EOF; we added connection health-checks and a max lifetime. Messy facility data — NUL bytes, literal "null" strings, and misaligned CSV rows needed careful cleaning before loading. Geocoding bias — averaging facility coordinates skewed "where a city is" toward hospital clusters, so we integrated the PIN-code directory for independent, precise geocoding. UI quirks — Streamlit's markdown parser mangled inline HTML, and an aspect-ratio banner collapsed on narrow screens; we moved to a fixed-height, embedded-image banner.

Accomplishments that we're proud of

A real, working agentic app on Free Edition that exercises all three required technologies — not a mockup. A RAG agent that refuses to hallucinate: every answer is grounded and cited, or it admits the gap. Genuinely useful safety and access — instant emergency handling, EN/ES support, adjustable reading level, and a facility recommender with a sensible distance-plus-capacity ranking. We even redeployed the agent from a laptop (lazy-init clients, env-cred fallback) rather than depending on a notebook — a clean, reproducible pipeline.

What we learned

How to stand up a production-style RAG agent on Databricks — chunking, Vector Search, serving, and grounding prompts — and how much the "cite or refuse" discipline improves trust. The real-world mechanics of Lakebase + OAuth (token rotation, pooling, SP role provisioning) and designing for graceful degradation when a backend isn't wired up. That data quality and geocoding make or break a recommendation feature — the ranking is only as good as the coordinates behind it. How to work within the constraints of Free Edition and turn them into cleaner architecture.

What's next for LuxHealth

More sources: openFDA (drug interactions, recalls) and AHRQ clinical guidelines as additional grounded knowledge. Smarter retrieval: query rewriting so vague follow-ups re-retrieve with full conversation context. Broader reach: more languages, global facility coverage, and a real geocoding service for any address. Care navigation: facility hours, telehealth links, and appointment hand-offs. Accessibility: voice input/output and screen-reader-first design. Trust at scale: an expanded evaluation harness and production monitoring of grounded-answer rates.

Built With

Share this project:

Updates