Skip to main content

Indemnity intelligence

These features exist to cut indemnity spend. They were built on the sainsburys branch for a Sainsbury's demo, around four things their claims team raised: psychiatric injury claims added to physical ones, slow and expensive experts, chasing suppliers and parts, and denied claims that come back years later at many times the original reserve.

Everything shares one rule: code counts, the model explains. The figures come from pure functions in packages/shared/src/signals.ts, so the alert on screen and the number the assistant quotes are the same number.

Claim alerts​

When a claim opens, ClaimAlerts (frontend/src/claimpilot/ClaimAlerts.tsx) shows push-style notifications bottom-left, in place of the old demo box. claimAlerts(claim, today, { since }) decides which:

AlertRaised whenAsks
Since you were last hereDiary entries or documents dated after this browser last opened the claimclaim_qa
Cost runningA credit hire has no end dateleakage_sweep
KYO alertThe claimant's solicitor adds psych claims, or revives denied claims, at 1.5× the portfolio rate or more; or the hire company has a profileopponent_profile
Psych watchThe injury is recorded as physical only, but the diary or an inbound document mentions psychological symptomspsych_watch
Lurk riskA denied, closed or silent claim scores medium or high on the lurk assessmentlurk_radar
LimitationOtherwise, an injury claim is within 120 days of primary limitation with no proceedingslurk_radar
SuppliersAn awaited instruction is past its due datesupplier_chase
SavingHousehold loss items could be replaced in kind through the client's nominated supplierleakage_sweep

Ask Claimpilot Chat on an alert opens the chat and sends the alert's own question under that capability, through requestCapability(id, message) on the chat dock. The assistant can read the same alerts with the get_claim_alerts tool. The last visit is kept in localStorage per claim and browser. There are no logins, so it is not per handler.

The presenter's demo tip and planted gotchas (metadata.demo) sit behind a Demo tip toggle at the foot of the stack.

The five capabilities​

CapabilityGroupToolWhat the tool hands the model
Indemnity savings sweepDecideindemnity_savings_sweepEvery priced saving with its evidence and confidence, and the total: hire above basic hire rate or past the repair allowance, duplicate payments and bills, bills paid above allowed, recoveries not pursued, expert fees above market, in-kind replacement, early psychological intervention. Exposure (a lurking claim, late suppliers) is listed but not added to the total.
Psych watchDecidescan_psych_signalsVerbatim hits for symptom terms in the diary and inbound documents (never our own letters), whether the injury is physical only, the solicitor's add-on rate, and the cost of early CBT against a litigated psych head.
Know your opponentProtectopponent_intelligenceThe profile of each party on the other side we hold intelligence on, against the portfolio averages, with tactics and what has worked; and the parties with no profile.
Lurk radarProtectlurk_assessmentDays since anything came from the claimant side, the primary limitation date and its basis, the reserve released at denial, evidence already lost, the score (0–100), band and factors, and what the claim could be worth if it comes back.
Chase suppliers and expertsProducesupplier_instructionsWhat is awaited, days late, chasers sent, the market wait and fee for the discipline and how they moved this year, and quicker panel alternatives. The playbook drafts the chasers.

Limitation​

limitation() gives a planning date, not a legal one: three years from the date of loss for personal injury, three years from the 18th birthday for a child claimant, six years without an injury. Date of knowledge, protected parties and agreed extensions are left to the handler and a lawyer, and the playbook says so.

UK claims only. These are England & Wales rules, so limitation() returns nothing for a claim that is not in GBP (limitationApplies). US limitation turns on the state and the claim type, and a confidently wrong date is worse than none. A US claim therefore never gets a limitation or lurk alert; lurk_assessment returns applicable: false with an outOfScope reason, and the lurk radar playbook tells the handler to confirm the statute with counsel instead of estimating a date.

The lurk score​

FactorPoints
Injury claim denied or closed without proceedings25
Silence from the claimant side: 365+ days / 180+ days20 / 10
Limitation within 120 days / within a year25 / 15
Opponent revives denied claims at 2× the portfolio rate or more / above it25 / 10
Injury severe or catastrophic / moderate15 / 10
Psychological symptoms on file10
CCTV, logs or witnesses already lost10

60 or more is high, 35 or more medium. It does not apply once proceedings are issued or limitation is more than 30 days past.

Where the KYO and benchmark figures come from​

packages/shared/src/intel.ts holds a fixed, illustrative table: six fictional opponents (four claimant firms, two credit hire companies), market waits and fees for nine expert disciplines, and eight fictional panel experts. In production this is MI computed over the client's book. Every screen and tool result that uses it carries INTEL_SOURCE, and the system prompt tells the assistant to present these figures as portfolio intelligence, never as facts about the claimant, and to keep comments about firms professional.

Firms are matched by name, loosely (findOpponent), because a claim records a firm the way the handler typed it.

Because the table is fixed, KYO only fires on claims whose claimant firm is one of its four. So that it shows up on ordinary UK claims and not just the Sainsbury's ones, the generator gives about half of UK claims (those with an even claim number) one of those firms when the claimant is represented (knownOpponentFor in api/src/generator/generator.ts); the rest invent a firm as before. Scenarios with their own client name their firms in the brief and are left alone, as are US workers' comp claims.

Two optional claim sections​

The claim contract gained two sections, both optional. They live in the JSON document, so neither store needed a migration:

  • hire: a credit hire, with provider, vehicle, start and end dates, daily rate, evidenced basic hire rate, and when repairs were authorised and intervention offered.
  • instructions: what we have asked suppliers and experts to do, with due dates, chasers, fee quoted and status.

Claims without them simply raise no hire or supplier alerts. Code on main reads these claims too, and drops the two sections when it parses them.

The Sainsbury's scenarios​

Five scenarios in api/src/generator/scenarios.ts are set at the SAINSBURYS client, whose handling rules include CCTV preservation, rehabilitation offers, intervention vehicles, supplier chasing, limitation reminders and in-kind replacement through Argos. The generator writes that client block over whatever the model returns, and each scenario's check rejects a record that lacks the facts its alerts depend on (the generator retries with the shortfalls as feedback).

ScenarioWhat it shows
sainsburys_el_wrist_psychA colleague's wrist fracture with flashbacks in the GP notes, Brackwell Kane on the other side, and a late hand surgeon
sainsburys_pl_slip_lurkingA denied customer slip, £20,000 reserve released, silence for well over a year, CCTV overwritten, limitation weeks away
sainsburys_motor_credit_hireA home delivery van claim with credit hire still running at double the basic hire rate
sainsburys_store_flood_suppliersA superstore flood waiting on a compressor and an overpriced surveyor while the chilled aisles lose money
sainsburys_product_kettle_argosAn own-brand kettle fire where the customer's kitchen could be replaced through Argos

Generate them one at a time: the local D1 store is a single SQLite file, and parallel runs fail on the lock.

npm run generate -- --lob general_liability --scenario sainsburys_pl_slip_lurking --count 1

On the sainsburys branch, landing on the app and Next claim prefer Sainsbury's claims and the claims list pins them to the top (FOCUS_CLIENT in RandomClaim.tsx). On main FOCUS_CLIENT is unset, so they are simply part of the catalogue.