Tanmay's Mycroft Update - Inside Lemonade’s Claims Bot, Building a Production-Ready AI Workflow

Lemonade automates 96% of claims intake with no human involved, and Tanmay Kulkarni builds a working reference implementation to find out where the real engineering difficulty actually lives.

6:14 video5 min readWatch on YouTube

Ninety-six percent. That's how often Lemonade's claims bot takes a customer's claim straight through with no human in the loop at all, and fifty-five percent of the time it closes the claim entirely, end to end, while the customer is still holding their phone. Those numbers are genuinely impressive, and they're also the extent of what Lemonade's public filings actually explain. What they achieve is detailed. How they decide is almost entirely absent. So Tanmay Kulkarni wrote a case study on the automation, then built a working reference implementation of the workflow behind it, specifically to find out where the real engineering difficulty lives.

Four questions for every stage

Before opening up any individual stage of the system, the method used throughout is a consistent set of four questions applied at each step: what's mocked, what did I make up and does the code admit it, what happens when it says no, and could you prove afterward what happened and why. That framework, applied consistently, is what turns a demo into something closer to an honest audit of production readiness.

A worked example, not a real customer

To make the workflow concrete, the case study walks through an illustrative scenario involving a customer referred to as Sophia, who is explicitly not a real Lemonade customer but a constructed worked example, deliberately built to stay inside what Lemonade has actually confirmed publicly. Sophia files a claim for a vet visit related to her dog's kennel cough, for $120, dated the first of May, submitted as free text.

Stage one: intake

Intake's job is turning that free text into something checkable: a diagnosis, an amount, a date, and a confidence score. In the worked example, that confidence lands at 0.95, comfortably above the threshold needed to move the claim forward. In the reference implementation, intake talks to a fake adapter that deterministically returns perfect JSON every time, at no cost. A real model doesn't behave that cleanly. It wraps JSON in an explanation, invents a field, or times out, which means a real system needs retries with backoff, schema validation on every response, and a fallback for when validation fails anyway. At that point, every claim becomes a token bill and a latency budget someone is answerable for.

Stage two: verification

Verification runs four checks in a fixed order and stops at the first one that fails: are the diagnosis, amount, and date all present; does a policy record exist for this customer; is there a fraud signal attached to them; and does what they claimed match the policy record within tolerance. If a claim clears all four checks, it moves on, and critically, every rejection gets a named reason rather than a vague "needs review" label, things like no record found, mismatch, or fraud flag, so it's always clear why a claim stopped. Both the database lookup and the fraud signal in this reference implementation are mocks, but the interface is built to stay identical when real data sources are swapped in. One deliberate design choice worth flagging: fraud detection is kept genuinely independent rather than folded into the record lookup as one more field, since Lemonade's fraud system and its claims bot are described as two separate things, and the reference implementation avoids repeating a mistake where outside coverage tends to merge them into one. The matching tolerance used here was invented and explicitly labeled as such, since it still needs tuning against real claims data.

Stage three: the authorization gate

This is the stage described as the one worth sitting with longest. Lemonade's own 10-K states that its AI escalates claims it isn't authorized to settle to a human expert, meaning the system's authority has a defined boundary. But nowhere in any public filing, shareholder letter, deck, or interview does Lemonade specify where that boundary actually sits: no dollar amount, no claim type, no confidence threshold. The reference implementation's authorization gate reflects that absence directly. The file contains no hardcoded rule at all. It calls a policy function that has to be supplied externally, because settlement authority might not even be a simple dollar threshold, and writing in an arbitrary number like "under $500" would quietly imply that it is, without any basis for that claim.

To make the demo runnable at all, a policy function is supplied with a threshold of $500, and that number is invented exactly like the tolerance value used in verification. The key difference is that it deliberately carries no "dev" marker, because a dev marker functions as a promise that a value is a real default worth tuning. This number isn't that. It's a test prop, and labeling it as a real default would have been its own quieter kind of dishonesty.

What production actually requires

The authorization gate is also identified as the stage that changes most between a reference implementation and a real production system. In an actual insurer, that policy function isn't something written casually, it's a decision a compliance team signs off on formally. That means a production version needs a full audit trail for every claim, capturing the inputs, the outcome, and which version of the policy decided it, the ability to explain a denial to a regulator in plain English, and idempotency, so that a retry never results in paying the same claim twice. None of that exists in the reference implementation. All of it is non-negotiable before anything like this touches real claims.

Proving the wiring, not just the answer

The reference implementation includes 43 passing tests, and part of what those tests prove is more specific than "the system returns the right answer." Some tests use spies to demonstrate that a rejected claim never even reaches the next stage in the pipeline, confirming that later code simply never runs for a stopped claim, not just that the final output happened to be correct.

Key takeaways

  • Lemonade's claims bot automates 96% of claim intake with no human involved and closes 55% of claims end-to-end, but public filings don't explain how the underlying decisions are made.
  • The workflow runs through three stages in order, intake, verification, and an authorization gate, stopping the moment any stage returns a rejection.
  • Every rejection is given a named reason rather than a generic status, and mocked components like the database and fraud signal are built with interfaces meant to stay identical once real data sources are swapped in.
  • The authorization gate deliberately contains no hardcoded rule, reflecting the fact that Lemonade has never publicly disclosed where its AI's settlement authority actually ends.
  • Production-readiness requires an audit trail, plain-English explainability for denials, and idempotency to prevent duplicate payouts, none of which exist in the reference implementation.

Try it yourself

Anyone building a system that talks to a model can apply the same four questions used here, what's mocked, what was invented and whether the code admits it, what happens on a rejection, and whether the outcome can be proven afterward, to measure their own honest distance from production. This breakdown comes from Tanmay Kulkarni as part of Humanitarians AI Fellows' Mycroft Financial AI work.

Chapters

  1. 0:00The Stat: 96% automation and 55% end-to-end closures
  2. 0:40The Three Stages: Intake, Verification, and Authorization
  3. 1:10Stage 1 (Intake): Managing token bills and latency budgets
  4. 1:45Stage 2 (Verification): The four checks and naming your rejections
  5. 2:20Stage 3 (Authorization Gate): Solving the "mystery boundary"
  6. 2:50Production Non-Negotiables: Audit trails and idempotency
  7. 3:20Testing the Wiring: Using spies to prove a claim stopped
  8. 3:50Measuring your honest distance from production
Full transcript(auto-generated, with timestamps)

The Stat: 96% automation and 55% end-to-end closures

[0:00]96%. That's how often Lemonade's claims bot takes a claim straight from a customer, no human in the loop at all. And 55% of the time it just closes it, end-to-end while you're still holding your phone. I read that in their 10K and thought, "Okay, that's genuinely impressive." So, how does it work? And that's the thing. They'll tell you what it achieves in detail, how it decides, almost nothing. Hi, I'm Tanmay Kulkarni. This week I wrote a case study on Lemonade's claims automation, then built a working reference implementation of the workflow behind it, so I could see where the hard parts actually live. Three stages: intake, verification,

The Three Stages: Intake, Verification, and Authorization

[0:40]Authorization gate. A claim moves through them in order, and it stops the moment one of them says no. Before we open any of it up, here's what I'm going to ask at every single stage. Four questions: What's mocked? What did I make up and does the code admit it? What happens when it says no? And could you prove afterwards what happened and why? That's the whole method. Watch me run it three times, then run it on your own thing. Let's make that concrete. The case study walks through an illustrative scenario,

Stage 1 (Intake): Managing token bills and latency budgets

[1:10]A customer we'll call Sophia. She isn't a real Lemonade customer, she's a worked example, deliberately built to stay inside what Lemonade has actually confirmed. So, Sophia files a claim. Her dog had a vet visit for kennel cough. $120, 1st of May. That's free text. Intake's whole job is turning it into something checkable: diagnosis, amount, date, and a confidence score. 0.95 here, comfortably above threshold, so it moves on. Here's what's actually holding that up. In my scaffold, intake talks to a fake adapter, deterministic, free, returns

Stage 2 (Verification): The four checks and naming your rejections

[1:46]Perfect JSON every single time. A real model won't. It'll wrap the JSON in an explanation, invent a field, or just time out. So, you need retries with backoff, schema validation on every response, and a fallback for when it fails anyway. And it stops being free. Every claim is now a token bill, and a latency budget you're answerable for. Stage two. Verification runs four checks in order and bails at the first one that fails. Are the diagnosis, amount, and date all actually there? Does a policy record exist for this customer? Is there a fraud signal on them? And does what

Stage 3 (Authorization Gate): Solving the "mystery boundary"

[2:21]They claimed match what the record says within tolerance? So, if he clears all four, and notice every rejection gets a named reason, not needs review, no record found, mismatch, fraud flag. You always know why a claim stopped. Both of those data sources are mocks. A fake database, a fake fraud signal. Swapping in the real ones is the easy part, as long as the interface stays identical. That's the whole reason they're separate files. The part I'd flag, keep fraud genuinely independent.

Production Non-Negotiables: Audit trails and idempotency

[2:52]Don't fold it into the record lookup as one more field. Lemonade's fraud system and its claims bot are two different things, and outside coverage keeps merging them into one. I didn't want my own code repeating that mistake. And that matching tolerance, I made it up. It's labeled, but it still needs tuning against real claims. Quick one before we go on. Two undisclosed values so far, and I invented a number for both and labeled both. There's a third. So, what did I

Testing the Wiring: Using spies to prove a claim stopped

[3:22]Put in the authorization gate? Commit to an answer. Stage three. And this is the one I keep thinking about. Lemonade's own 10-K says AI Jim Triage is claims he's not authorized to settle to a human expert. So, the authority has a boundary. They say so themselves. But nowhere in any filing, shareholder letter, deck, or interview do they say where that boundary actually is. No dollar amount, no claim type, no confidence score. So, here's my authorization gate. That's the

Measuring your honest distance from production

[3:51]Whole file. There's no rule in it at all. It calls a policy function that you have to supply. I could have put a number in there. But settlement authority might not even be a dollar amount. Writing under 500 would quietly claim that it is, and I don't know that. The absence is the honest answer. Which raises an obvious problem. If the gate has no rule, how does the demo run at all? It supplies one, amount under 500. And here's the bit I want you to notice. That number is invented exactly like the other two. But it deliberately carries no DEV marker, because a DEV marker is a promise. It says this is a real default, go tune it. This isn't that. It's a test prop. Labeling it would have been its own kind of lie, just a quieter one. Which makes this

The stage that production changes most. Because in a real insurer, that policy function isn't code somebody writes on a Tuesday. It's a decision a compliance team signs off on. So you'd need an audit trail, every claim, the inputs, the outcome, and which version of the policy decided it. You'd need to explain a denial to a regulator in plain English. You'd need idempotency, so a retry never pays the same claim twice. None of that is in my scaffold. All of it is non-negotiable in production. 43 tests, all green, and here's what that buys you. The wiring is proven. Some of these use spies to show a rejected claim never even reaches the next stage. Not that it returned the right answer. That the later code never ran. So you don't have to build any of that. Clone it, add your API key, and

You're straight into the interesting part. Watching a real model hit these stages, and finding where your own claim data breaks it. That's the one thing tests can't tell you. Everything else is done. So your turn. Take something you've built that talks to a model, a demo, a prototype, anything, and run those same four questions on it. What's mocked? What you invented and whether the code says so. What happens when it refuses and whether you could prove afterwards what it did. Write the answers down, then pick the single one that would break first with real users on it. That's not a to-do list, it's your honest distance from production and you'll be closer than you think on most of it. You'll just know exactly where you're not. The case study and the full implementation are both linked below. Thanks for watching. I'm Tanmay Kulkarni.

More from Mycroft Financial AI

Humanitarians AI Lyrical Literacy Project