Inspiration
US healthcare bills patients by friction. Insurers deny roughly 1 in 5 in-network claims, yet fewer than 1% of denials are ever appealed — even though 30–60% of appeals win. An estimated 80% of medical bills contain errors,
and Americans carry ~$220B in medical debt, much of it legally disputable. The system doesn't beat you in a fight; it beats you because you never show up. We wanted to build the advocate that *does* show up for every patient
— and proves every move it makes on your behalf.
## What it does
**Sovereign is a voice-first AI patient advocate.** You talk to it, snap a photo of your medical bill / EOB / denial letter, and it:
- **Reads** every line with Grok Vision — provider, CPT/HCPCS codes, billed vs allowed amounts.
- **Finds** overcharges and illegal billing: duplicate charges, upcoding, unbundling (NCCI edits), and balance-billing that violates the No Surprises Act.
- **Computes what you truly owe** (deductible + coinsurance, capped at your out-of-pocket max) — anything billed above that is recoverable.
- **Checks the denial** against the policy and tells you if it's appealable, with the statute and the deadline.
- **Drafts the appeal** and a phone negotiation script.
- **Signs every action on your behalf** as a cryptographically verifiable, patient-owned receipt.
On a real $4,200 ER bill in our demo, it flagged a **duplicate CPT 99285** and **level-5 upcoding**, scored it **95/100 (critical)**, estimated **~$3,200 overcharged** with **85% appeal odds**, then produced a signed receipt
you verify by scanning a QR → **VALID**.
## How we built it
- **Grok Voice** (`grok-voice-latest`, realtime WebSocket) — the patient just talks; the agent runs the checks and reports back, in 100+ languages.
- **Grok Vision + reasoning** (`grok-4.3`) — document OCR, overcharge detection, appeal simulation, and letter drafting.
- **FastAPI** backend with an async pipeline, SSE event streaming, and a **Sovereign Trust Layer**: intent → consent/risk → simulation → Ed25519-signed receipt.
- **Next.js 16 / React 19 / Tailwind** frontend, deployed on **Vercel**, with a public verify page.
The analysis is grounded in CMS, KFF, FAIR Health, and the No Surprises Act — not vibes. The patient's true responsibility on a covered line is:
$$ \text{owed} = \min\Big(d + (A - d)\cdot c,\ \text{OOP}_{\text{remaining}}\Big),\quad d = \min(A,\ D - D_{ytd}) $$
where \\(A\\) = allowed amount, \\(D\\) = deductible, \\(c\\) = coinsurance. We benchmark charges against Medicare rates and FAIR Health percentiles, and map denials to CARC/RARC codes with their real appeal ladder
(internal: 180 days; external/IRO: 45 days).
## Challenges we ran into
- **Flip the perspective, not just the prompts.** The hardest bug was logic, not syntax: inherited insurer rules *blocked the patient's strongest cases* (high overcharge read as "fraud → deny"). We inverted the trust engine
to be patient-side — a high overcharge is a slam-dunk, gated only by the patient's consent, never blocked.
- **Cross-language cryptography.** Receipts signed in Python failed verification in the browser because JavaScript's JSON collapses `100.0 → 100`, changing the signed bytes. We normalized the canonical form so receipts
verify across the language boundary.
- **A QR that couldn't fit the proof.** The verify URL was too large for the QR; we switched to a short receipt-id link that fetches and verifies server-side.
- **Live, not slides.** Three-hop voice (browser → backend → xAI realtime) and a real pipeline meant every demo-killer only surfaced when we ran the full flow end to end.
## Accomplishments that we're proud of
- A **working, live product** on the real Grok API — Vision read an actual bill, the pipeline runs live, and the demo is deployed, not a mockup.
- **Provable patient agency**: every autonomous action is consent-gated, simulated, and **Ed25519-signed** into a receipt the patient owns and any third party can verify with no shared secret. Scan the QR → **VALID**.
- **Accuracy grounded in real billing law** (CMS/NSA/FAIR Health), not generic LLM guesses.
- **Voice-first and multilingual**, so the sick, the elderly, and non-English speakers — the people overcharged most — can just talk.
## What we learned
Test the *real integration path*, not just units — every demo-killer (a crashed enum, an inverted gate, a broken signature, a wrong endpoint) only showed up running the live flow end to end. And in healthcare AI,
**provenance is the product**: the signed receipt matters as much as the answer. Trust you can *check* beats trust you're *told*.
## What's next for Sovereign — AI Patient Advocate
A **standing advocate** that watches your health-money: auto-ingests every bill/EOB/denial, audits the moment it lands, and proactively reaches out — *"your $4,200 bill just hit, I found $3,200 in errors, want me to fight
it?"* — with every action consent-gated and signed. Beyond that: a **portable trust fabric** where every action any health AI takes on your behalf flows through one consent-gated, signed ledger you own and carry to any
provider, app, or regulator. Patient agency, made portable and provable.
Log in or sign up for Devpost to join the conversation.