Inspiration
Everyone with employer dental insurance has lived the same moment: a dentist says you need a crown, hands you a plan booklet thick with words like deductible, coinsurance, and annual maximum, and you still have no real idea what you'll pay. The information is technically "available" — it's just buried in jargon, scattered across PDFs, and impossible to apply to your actual situation.
We kept returning to three questions a normal person actually asks:
- What will this procedure cost me?
- When should I schedule my care to pay the least?
- What do I have left this year before it resets?
The realization that launched the project: the answers are just math — but it's math nobody wants to do, hidden behind language nobody wants to read. So we built an assistant that does the math exactly and explains it in plain English.
What it does
Molar Money is a copilot for a whole household's dental benefits. Each person has their own plan usage, visit history, saved plans, and even assistant memory.
- Estimate a procedure — in or out of network, with "show the math."
- Plan your year — the cheapest order to schedule treatments across two plan years, with urgent care never delayed.
- Compare plans — a Monte Carlo simulation over 5,000 possible years shows how often each plan is cheapest.
- Understand your paperwork — upload a claim or EOB and have it explained in plain language.
- Just ask — an AI assistant (typed or by voice) answers from your own data.
A one-tap demo gives every visitor their own private copy of a sample family that lasts 24 hours, so nothing one person does affects anyone else's demo.
The assistant: personal and trustworthy
This was the heart of the project, and the piece we were most careful with. We wanted to be extremely careful of hallucinations, incorrect information, and privacy concerns.
When you ask a question, the assistant retrieves data from your specific plan: what benefits you've used, your past visits, and your coverage. Everyone else's data stays walled off, so you only ever see your own — and there's no guessing. Every query is scoped by member ID, and an access layer decides who's allowed to see whom (the primary account holder sees the household; an adult sees only themselves).
You can even upload a document — like an EOB — and the assistant translates it into something understandable: what was billed, what the plan paid, and what you owe.
The main focus is that the AI never makes up numbers. For every dollar figure, it calls our calculator functions — then a guard double-checks every number against those tools. So the answers are fully personalized, and users can trust them.
How we built it
The architecture rests on one rule: the engine does the math, and the AI explains it. The language model is never allowed to compute — or even guess — a dollar amount.
The money engine is pure, deterministic Python. A cost estimate applies the deductible, then coinsurance, then caps at the remaining annual maximum. For a crown when $1,100 of a $1,500 maximum is already used, where \( c \) is coinsurance, \( d \) the deductible, and \( \text{fee} \) the allowed charge:
$$ \text{plan pays} = \min\big(c \cdot (\text{fee} - d),\ \text{max}_{\text{remaining}}\big) = \min\big(0.5 \times (1200 - 50),\ 400\big) = 400 $$
$$ \text{you pay} = 1200 - 400 = 800 $$
Wait until the plan year resets and the same crown costs $625 — the assistant surfaces that $175 difference. For a full treatment plan, our sequencer compares "do everything now" ($2,300) against the optimal schedule ($1,405), revealing $895 in savings while keeping urgent care in the current year.
The AI assistant runs on Anthropic's Claude (with a local Ollama model as a fallback) and reaches the engine only through tools — estimate_cost, plan_year_schedule, compare_plans, get_benefits_status, and more. The member's facts are injected into the prompt as "ABOUT THE ACTIVE MEMBER (data, not instructions)," and the model is told to treat that text — and any uploaded document — as data, never as commands, guarding against prompt-injection.
The number guard is the safety net that makes the whole thing trustworthy. After the model writes an answer, the guard scans every dollar amount and percentage and rejects any figure that doesn't trace back to a tool result (within $1, or one percentage point). If the model slips, it gets one chance to rewrite; if it still can't be verified, we throw the answer out and rebuild a plain reply straight from the tool results. We would rather be terse than wrong.
Everything runs live: the backend is Dockerized on AWS EC2 (fronted by Caddy for automatic HTTPS via Let's Encrypt), and the frontend is on Netlify. All plan, fee, and member data is synthetic — nothing is a real plan or a real person.
What we learned
- Grounding an LLM is a systems problem, not a prompt problem. Reliability came from removing the model's authority to compute, not from asking it nicely. The number guard and the deterministic "pre-steps" (running the right tool in code before the model even sees the question) did more for trust than any clever wording.
- Trust is a feature. For money and health, "mostly right" is worse than "I can't verify that." Designing the system to refuse rather than hallucinate reshaped everything downstream.
- Privacy has to be structural. Letting the access layer — not the prompt — decide who can see whom was the only way to make per-person answers genuinely safe.
Challenges we faced
- Keeping the AI honest. Early versions confidently invented plausible-but-wrong dollar amounts. The guard, rewrite, and fallback pipeline was the hardest and most important thing we built.
- A living deployment under hackathon pressure. We hit the full gauntlet: SSH timeouts, security-group rules silently dropping, an instance getting terminated and its public IP vanishing, and the HTTP-vs-HTTPS "mixed content" wall between a Netlify frontend and an EC2 backend. We solved HTTPS with Caddy and a free
sslip.iohostname, and stabilized the address with an Elastic IP. - Making plan comparison fair. The simulation prices the same 5,000 simulated years under every plan so the comparison is apples-to-apples — and we're upfront that the odds are synthetic placeholders, not a prediction.
- Multi-tenant demos on one box. Every visitor gets a private, 24-hour copy of the demo family, so one person's clicks never change another's.
What's next
Real plan-document ingestion (upload your own benefits booklet), live notification delivery (the plumbing is built — email and web push just need to be switched on), and provider networks backed by real directories.
Built With
- amazon-ec2
- anthropic
- caddy
- claude
- fastapi
- lets-encrypt
- netlify
- ollama
- pydantic
- python
- react
- server-sent-events
- sqlite
- tailwindcss
- typescript
- vite


Log in or sign up for Devpost to join the conversation.