Team name: W Christine

Project name: Claims Delay Watch

Tagline (short description): Spots slow insurance claims before they cost a renewal, then opens a ticket and alerts the right team lead in Slack, automatically.

Try it out / repo: https://github.com/anvsult/hack2thefuture

Built with: python, streamlit, pandas, scikit-learn, sqlite, slack, slack-socket-mode, gemini, google-calendar


About the project (paste into Devpost)

Team name: W Christine · Business Track, Option A (Insurance) · Millennium Mutual dataset

In one line: claims that stay open past 30 days cut renewals from 81% to 44%. Claims Delay Watch spots those claims early, opens a ticket for the right team lead, and posts an alert to Slack that people can act on with one click.

The business problem

Each of Millennium Mutual's four leaders had a different theory. The CFO asked where the money was going. The VP of Claims wanted more adjusters. The Head of Retention said renewals were slipping. The Head of Distribution said not to slow the brokers down. We tested each theory against the policies and claims data.

  • Slow claims cost renewals. Policies whose claims all closed within 30 days renewed at 81% (n=379). Policies with a claim that took longer than 30 days renewed at 44% (n=91), a gap of 36.8 points. The company pays the claim and then still loses the customer.
  • The delay is concentrated and recent. In 2025, Team C (Montreal and Quebec City) closed claims in about 17 days, the same as Teams A and B. In 2026 it took 28 to 38 days, and its volume did not increase. So the VP's theory that the department needs more adjusters is only partly right.
  • Large claims are slow everywhere. On every team, claims of $10,000+ take 36 to 39 days because of senior review. Smaller claims take 12 to 23 days.
  • A separate leak, not automated: broker B07's loss ratio is about 205% (the whole book: 49%). 60 of its 70 claims are theft claims, mostly in Toronto. This answers the CFO's payout question. It is an underwriting issue, so the other brokers don't need to slow down.

Automation: triggers and actions

A simulated clock replays the history one day or one week at a time. On each step, the rules run on every open claim, with no button press needed.

Triggers

  1. Slow claim: warn at 20 days and critical at 30 days. Each tier fires on the claim's age, or on its predicted days to close for early warning. Both thresholds are sliders.
  2. Senior-review stall: a $10,000+ claim open longer than the historical 75th percentile of close times for large claims.

Automated actions for each alert

  1. Create a ticket in SQLite, assigned to the owning team lead.
  2. Write a next step that matches the cause:
    • Team C claim: reassign it to the team with the lowest open backlog.
    • Review stall: send it to a senior reviewer today.
    • Other slow claims: fast-track the claim with a named adjuster.
    • The policy renews within 90 days: also call the customer.
  3. Attach an estimate of the premium at risk: annual premium × the 36.8-point renewal gap.
  4. Gemini writes a two-sentence summary. A fixed template is the fallback.
  5. Post to Slack with action buttons.

Closing the loop from Slack: the buttons (Reassign to Team B, Escalate, Fast-track, Book retention call, Resolve) arrive over Socket Mode, with no public URL needed. A click updates the ticket and edits the Slack message. "Book retention call" creates a Google Calendar event (or a prefilled calendar link). The dashboard's "Actions from Slack" feed refreshes within 3 seconds.

Reliability safeguards: one alert per claim per tier, with deduplication saved in SQLite, so moving the clock back and forward never re-sends. There is also a dry-run switch, and alerts go to a private channel.

Data and technical implementation

Cleaning (each fix is shown in an on-screen cleaning log, with what we changed and why):

  • Mapped 16 spellings to 5 city names (210 rows).
  • Converted premiums stored as text such as "$1,046.62" to numbers (140 rows).
  • Parsed dd/mm/yyyy dates in start_date (93 rows) and loss_date (15 rows).
  • Removed 15 duplicate claims.
  • Set invalid ages to unknown.
  • Kept $0 premiums but left them out of loss ratios.
  • Flagged 8 claims with no amount.
  • Kept 41 denied claims in the wait-time statistics, because the customer still waited.

Modelling: two days-to-close estimators, retrained monthly on a time-based split and with no leaking features (no status, paid amount, or close date). One is a transparent team × amount lookup. The other is a gradient boosting model. The model did not beat the lookup, so the lookup is the default. We say this on screen.

Structure: one job per module.

Module Role
data.py Load and clean the CSVs
predict.py The days-to-close estimators
detect.py The business rules, as pure functions
store.py SQLite tickets and the Slack activity log
notify.py Gemini summaries and Slack posts
slack_actions.py, socket_mode.py The Slack buttons
gcal.py Calendar events
app.py The Streamlit UI, served with the Slack endpoint on one ASGI app

User experience and visualization

The Streamlit dashboard has four tabs:

  • Live: an animated timeline, a "what changed" banner, and KPI tiles with deltas. The tiles show premium put at risk this year, premium at risk now, open claims, claims open 30+ days, and claims needing action.
  • Evidence: the renewal rate by claim-wait bucket, days to close by team, claims passing 30 days by team, $10k+ wait times, and the B07 loss ratio. Each chart has a one-line takeaway and there is a recommendation panel.
  • Alerts & tickets: today's alerts with the owner, the premium at risk, and the next step. It also shows the ticket queue (open, in progress, resolved) and the live "Actions from Slack" feed.
  • Data & method: the cleaning log, the model compared with the baseline, and the formula for premium at risk.

Business impact

  • Our estimate is that claims passing 30 days put about $63k of renewal premium at risk in 2026 (data runs to October 31), up from about $28k in 2025. Team C accounts for about $51k of it (93 of 128 affected policies).
  • Faster response: the alert fires at 20 days, before the 30-day point where renewals drop. The right lead gets the ticket with the next step already written.
  • Lower cost: the fix is targeted, so the company doesn't need to hire across the whole department. Rebalance Team C now, find out what changed there in January 2026, and add a fast lane for $10k+ senior review.
  • Lower risk: the system books a retention call automatically when a delayed claim's policy renews within 90 days.

The dollar figures are estimates (premium × the measured renewal gap), and the screen says so.

Challenges and what we learned

  • The data has no review start date, so we infer a review stall from the claim's age and state that limit on screen.
  • Rewinding the clock re-sent Slack alerts until we made deduplication persistent.
  • The order of cleaning matters: the date fix and the duplicate removal changed the renewal numbers.
  • A transparent baseline can be as good as a model.
  • Automation needs guardrails before it is safe to turn on.

What's next

Connect to a live claims system instead of the replay. Add a real review-start timestamp. Tune the thresholds from outcome data. Add a B07 underwriting watch.

Share this project:

Updates

Submission history