Facility Trust Desk - FTD
Can this facility actually do what it claims? — turning 10,000 messy Indian healthcare records into decisions a non-technical planner can trust.
💡 Inspiration
We were handed 10,000 facility records full of free-text claims about ICUs, maternity wards, trauma centres and cancer care — uneven, repetitive, and unverified. For a district health planner or NGO coordinator, the dangerous failure mode isn't missing data; it's over-trusting it: sending an emergency case to a "24x7 casualty" that closed years ago, or counting an "ICU" that's actually "under construction." So we set one rule for ourselves: never present a claim the record's own text doesn't support.
🏥 What it does
For any facility, Facility Trust Desk produces a trust signal for each capability — ICU, NICU, maternity, emergency, trauma, oncology, surgery, diagnostics, blood bank:
- Strong / Partial / Conflicting / Unsupported / Not stated — with a confidence level.
- Every important claim is cited back to the facility's own words, highlighted in the source text.
- Uncertainty is honest — weak or negated evidence ("ventilator out of order", "no ICU, refer to district") is never shown as fact; silence is reported as Not stated, not guessed.
- Planners can act — add notes and override verdicts, which persist for the next reviewer.
- Data-quality caveats are surfaced per record (sparse fields, missing capacity).
🛠️ How we built it
A retrieve-then-judge pipeline that makes citation hallucination structurally impossible:
- A deterministic extractor scans the dataset's evidence fields (
description,capability,procedure,equipment,specialties) for verbatim capability terms, with clause-bounded negation detection. Because citations are real substrings, they can't be fabricated. - The Databricks Foundation Model API (Llama 3.3 70B) judges each capability using only that source text.
- A hard guard: a "Supported" verdict requires a real citation, or it's auto-downgraded.
It runs as a Databricks App on Free Edition, reading the 10k Unity Catalog table via the app's service-principal OAuth, with planner actions persisted to Lakebase / SQLite. The model layer is a resilient fallback chain — Databricks FM → offline rule engine — so it never goes down.
📚 What we learned
- The hard part isn't the model — it's making it honest. Retrieve-then-judge + a citation-required guard beat raw prompting for trust.
- In real-world Indian facility data, negation is everything, and it must be clause-scoped so a negation about one item ("…SNCU. No adult ICU…") doesn't bleed onto another.
- Databricks Apps internals: service-principal OAuth, Unity Catalog grants, and that the Apps sandbox blocks cloud-fetch downloads.
🧗 Challenges we faced
- Apps sandbox blocked "cloud fetch" (result download from storage) → switched the SQL connector to inline results.
- Permissions: the app's service principal needed
USE CATALOG/USE SCHEMA/SELECTgrants on the Marketplace catalog. - Negation precision: a negated indirect term ("no ambulance") was wrongly marking Emergency as "Unsupported" — we refined scoring so only a negated direct claim contradicts a capability.
- Free Edition rate limits on the FM endpoint → the resilient fallback keeps every verdict cited and honest even when the model is throttled.
🚀 What's next
The same evidence engine extends to the other three tracks — Medical Desert Planner and Referral Copilot — using the bundled India PIN-code directory and NFHS-5 district health indicators tables for trust-weighted geographic gap analysis.
Built With
- anthropic
- apis
- apps
- catalog
- connector
- databricks
- databricks-sdk
- databricks-sql-connector
- foundationdb
- lakebase
- marketplace
- model
- oauth
- pandas
- postgresql
- principal
- python
- sql
- sqlite
- streamlit
- unity
Log in or sign up for Devpost to join the conversation.