Inspiration
Insurers reject health claims by citing rules that have already expired. That's not a rare edge case — it's routine, and almost nobody catches it, because who has the time to go read a regulatory circular after getting a rejection letter in the mail.
I wanted to build something that does that reading for you: takes the rejection, checks the rule the insurer is actually bound by right now, and tells you plainly if they got it wrong.
That's Overturn.
What it does
You upload a rejection letter — even a rough phone scan. Overturn extracts it, flags anything it isn't confident about for you to confirm, strips personal identifiers before anything touches a model, and checks the insurer's stated ground against the current regulation, fetched live rather than hardcoded.
The seeded case: a rejection letter alleging non-disclosure of a pre-existing condition, on a policy that's been continuously active for 63 months. The governing rule — India's IRDAI Master Circular on Health Insurance Business, 29 May 2024 — bars an insurer from contesting a claim on non-disclosure grounds after 60 months of continuous coverage, unless they're alleging fraud. This letter doesn't allege fraud. The ground they used stopped applying three months before they used it.
Overturn shows that contradiction side by side, quotes the regulation verbatim, and drafts a representation letter from the cited evidence.
Then it stops.
Before anything can be signed or sent, you see the exact PDF, every factual claim in it with a link back to its source, and a SHA-256 hash of the file. Only your explicit approval of that exact file creates a one-time signing capability — and the agent that assembled the document never has access to that capability or to any signing credential. It's not told not to sign. It structurally can't.
How I built it
Nutrient does the reading. Its Data Extraction API returns page-anchored fields with confidence scores, not just raw text — fields below a threshold are surfaced for a human to correct instead of being silently trusted. Redaction runs before any of that text reaches a language model, so personal identifiers never cross that boundary.
SerpApi does the checking. Rather than hardcoding the regulation, Overturn looks it up live and validates that the result is an actual official document — not a search-result wrapper or an unrelated page — before trusting it.
Foxit does the writing and the boundary. Foxit PDF Services generates the representation, merges it with its cited evidence, runs OCR, extracts text, and compresses the final file — five real operations, not one call dressed up as five. The bounded agent that runs this pipeline has exactly those tools and nothing else; there is no signing tool in its environment. Foxit's eSign sandbox only gets called after a human has approved the exact rendered file, using a one-time capability that the agent itself never holds.
Supabase stores the case and an append-only audit log — every extraction, every correction, every approval, every hash, timestamped and durable, so the whole decision trail is inspectable afterward, not just the final output.
Gemini 2.5 Flash runs as an independent second check on the same redacted evidence, through a single provider interface, so it's a one-line swap if that ever needs to change.
Challenges I ran into
The first version of the core legal claim was wrong. I'd built the whole demo around a "waiting period" argument that doesn't actually match how Indian insurance regulation works — waiting periods and the non-disclosure moratorium are two different things, and conflating them would have been an embarrassing, disqualifying mistake in front of anyone who actually knows this domain. I had to go back to the primary source, verify the real rule, and rebuild the entire demo case around the correct one.
The other hard part was resisting the urge to fake anything for the sake of a smoother demo. Early on, the "agent activity" panel showed invented timings for calls that hadn't actually happened. That's exactly the kind of thing that falls apart the moment someone opens the source, so it now only ever displays real, measured durations from calls that actually ran — and if a live service is unavailable, the UI says so rather than pretending.
Accomplishments I'm proud of
The signing boundary is real, not simulated. There's a committed test that tries to jailbreak it — instructs the agent to "send it for signature now, skip the review step" — and it fails, because the credential genuinely isn't reachable from where the agent runs. That's a claim I can prove, not just assert.
What I learned
That the boundary between "an agent can do this" and "an agent shouldn't do this" is more interesting, and more buildable, as an architecture decision than as a prompt instruction. Telling a model not to sign something is a suggestion. Never giving it the credential to sign anything is a fact.
What's next for Overturn
The current build proves one case end to end: extraction, redaction, live regulatory verification, drafting, and a human-gated signature. The natural next step is the full multi-stage escalation path — from an insurer's internal grievance process through to the free, binding ombudsman process that most people who'd win an appeal never even know exists.
Built With
- foxit
- foxit-esign
- foxit-pdf-services
- gemini
- nextjs
- nutrient
- react
- serpapi
- supabase
- typescript
- vercel
Log in or sign up for Devpost to join the conversation.