Back to AI/ML Overview
βš–οΈ Demo Β· POC Β· 5-Day Build

AI Underwriting AgentTurn underwriter judgment into reusable, auditable evidence.

A browser-native simulation of an AI-assisted wildfire property underwriting workflow. The key insight: the similarity engine helps underwriters decide which way to go faster β€” the deterministic rating engine determines what premium that corresponds to. Built in 5 days as a take-home POC architecture demonstration.

5 days
end-to-end build
60 + n
precedents (grows with decisions)
17D
weighted risk vector per property
k-NN
in-memory, <1ms per lookup
Zero
backend β€” runs from file://
7-step
guided demo arc

🎯Two Pains Jason Surfaced

Slow approvals

Each new submission is evaluated from scratch. Underwriters spend time reviewing properties nearly identical to ones they decided last week β€” but there is no structured way to surface that prior decision as evidence. The knowledge exists; it just lives in someone's head, not in the system.

Broker trust doesn't compound

Broker quality varies significantly β€” submission completeness, documentation accuracy, fraud exposure. But that signal never accumulates into a structured profile the system can act on. Every submission from a new-relationship broker is treated identically to one from a trusted high-volume partner.

πŸ”‘The thesis
β€œI built the part most teams miss: a system that turns underwriter judgment into reusable, auditable evidence, so each future submission gets faster β€” without hiding the why.” The similarity layer is decision-support; the filing engine is the pricing authority. This distinction is what makes the system credible to a regulator.

πŸ—οΈThe Centerpiece Loop

Every decision a human underwriter makes is immediately encoded as a labeled precedent. The next similar property retrieves those decisions as evidence, surfaces the top reasons, and pre-populates the decision rationale β€” so the underwriter is verifying evidence, not reconstructing it.

The 7-step loop
1.
Broker email arrives β€” Agent extracts property + broker identity from unstructured email
2.
Enrichment β€” Cat-model score (fire/flood/wind) + feature vector (17 named risk indicators)
3.
Precedent retrieval β€” k-NN over the labeled store β†’ top 5 similar cases + their decisions
4.
Recommendation β€” Band: clear / leaning / mixed / novel + top reasons + auto-route signal
5.
Underwriter decides β€” Confirms pre-selected reasons β†’ approve / decline / defer β†’ written to store
6.
Queue consequence β€” Adjacent property re-ranks with a "strong precedent nearby" tag
7.
Mitigation β€” Deterministic recompute: "remove trees β†’ premium drops $50K" β€” from the rating engine
πŸ’‘Copilot-first by construction
The underwriter always makes the final call, and every call enriches the store. Automation depth is a dial, not a switch: Phase 1 retrieves and prefills; Phase 2 reprioritizes queues; Phase 3 enables bounded straight-through in narrow, well-precedented lanes. Each phase reuses the same infrastructure.

⚑Three Non-Obvious Design Decisions

1.

Hard seam: pricing stays deterministic

The k-NN similarity layer never sets a premium. fire-rates.js is the pricing authority β€” a relativity-rating engine with filed provisions. Mitigation deltas (β€œremove defensible space gap β†’ premium drops $X”) come from recomputing the deterministic engine with one provision changed, not from the similarity model.

Why this matters: β€œwhat exactly is learned vs fixed?” β€” this answer is clean and survives a regulator audit.

2.

Propagation reprioritizes queues β€” does NOT auto-elevate scores

Approve property A β†’ neighbor B gets flagged for re-review with β€œstrong precedent nearby (0.87 sim Β· approve)”. B's underwriting state does not change without fresh property-level evidence. This removes the feedback-loop and geographic-discrimination risk while keeping the visual demo beat: watch B move up in the queue after you approve A.

Portfolio act as hard vetoes: a 30% geographic concentration cap blocks even a β€œclear approve” recommendation.

3.

Novel cases surface explicitly β€” the system knows what it doesn't know

When the k-NN store has insufficient precedent, the recommendation band is novel and a distinct notice routes the property to an independent underwriter review. Showing β€œI don't know” explicitly increases credibility β€” it means the confident recommendations are actually confident.

βš™οΈTechnical Architecture

Risk vector

Each property is encoded as a 17-dimensional float vector over named, auditable risk indicators: proximity to ridge/canyon, slope angle, fire-hazard severity zone, construction materials, defensible space compliance, and cat-model subscores. The naming matters β€” underwriters can inspect and challenge each dimension.

k-NN store

In-memory weighted cosine similarity over 60 seed precedents + any session decisions. Under 1ms per lookup at this cardinality. In production: sqlite-vec is the zero-infrastructure swap β€” same interface, disk-backed, no separate server.

Rating engine

fire-rates.js β€” a deterministic relativity-rating engine: factor Γ— credibility-weight per provision + cat-peril curves. Computes every premium in the demo. Mitigation deltas are a targeted recompute with one provision changed; no ML involved in pricing.

Broker trust

Static seed profiles keyed by broker identity β€” submission count, approval rate, avg premium, years active, tier (trusted / standard / new). Surfaced in the intake detail panel for every email. In production: computed from historical referral outcomes, updated after each decision.

Module map
rng.js
Deterministic PRNG β€” reproducible demo
geo.js
CA geographies with cat-risk signatures
features.js
17-indicator risk taxonomy β†’ feature vector
vectorstore.js
In-memory weighted k-NN
recommend.js
Precedent retrieval β†’ bands + rationale
fire-rates.js
Relativity-rating engine (pricing authority)
mitigate.js
Provision-delta recompute β†’ premium delta
portfolio.js
Geographic concentration (30% cap)
brokers.js
Broker trust profiles keyed by email ID
emails.js
5 broker emails + pre-extracted submissions
generate.js
Synthetic property + precedent generator
app.js
Full browser wiring β€” tabs, decisions, demo guide

πŸ—ΊοΈThree Phases of Value

The progression sounds like a real insurer path, not an β€œAI takes over” story. Each phase reuses the same precedent store and the same rated engine β€” the automation surface expands, the infrastructure does not.

Copilot
Phase 1 (this build)
Retrieve similar cases, prefill decision rationale, draft broker follow-ups, suggest mitigations with deterministic premium delta. Underwriters work faster because the evidence is already there.
Triage agent
Phase 2 (roadmap)
Prioritize queues, surface clear matches, reduce follow-up round-trips. Adjacent properties get a β€œstrong precedent nearby” flag so underwriters see the easy cases first.
Bounded STP
Phase 3 (later)
Straight-through processing in narrow, well-precedented lanes. The 30% geographic cap and portfolio are hard vetoes β€” automation can speed things up but cannot override concentration risk.

β–ΆRunning the Demo

πŸ’‘Browser-native β€” no infrastructure required
The simulation runs entirely in the browser. No API keys, no backend, no Docker. The rating engine, k-NN store, and all sim modules are plain JavaScript loaded as static files.
# one-command launcher (opens Chrome automatically)
./start.sh
# then open
http://localhost:8791/index.html
# stop the server
./start.sh --stop

The guided demo panel (7-step arc) is in the collapsible at the top of the Submissions tab. Each step has a Spotlight button that switches tabs and pulses the relevant UI element. A Reset demo button in the header clears all session decisions and returns the store to the seeded 60-precedent baseline.

🎯

Leadership Takeaway

  • β†’Built the part most teams miss β€” judgment preservation, not just ML inference
  • β†’Deterministic engine as the pricing authority: credible to a regulator from day one
  • β†’Three phases of automation that reuse the same infrastructure β€” copilot β†’ triage β†’ bounded STP
  • β†’Novel-case routing is explicit: the system's "I don't know" surfaces separately, not as a low-confidence approve
  • β†’Portfolio as hard vetoes: geographic concentration cap survives even clear-band recommendations