DEV Community

Krish D Shah
Krish D Shah

Posted on

Building KAVACH — An AI-Powered Income Protection System for Gig Workers

Guidewire DEVTrails Hackathon Devlog

What if insurance didn’t ask you to file a claim…
and just paid you when something went wrong?

That idea became the starting point for KAVACH (कवच) — a parametric, AI-powered income protection system designed for India’s gig workers. This post documents what we built, why we built it, and how the system actually works under the hood.


**

The Problem

Gig workers operate in highly volatile conditions. A delivery partner’s income depends on:

  • Weather disruptions (rain, storms)
  • Air quality spikes (AQI)
  • Flooding and road blockages
  • Localized disasters
  • Platform demand fluctuations

A single bad day can wipe out ₹500–₹2000 of expected income.

Traditional insurance doesn’t work here:

  • Claims require manual filing
  • Verification takes days or weeks
  • Payouts arrive too late
  • Small income losses aren’t covered

So the real question became:

Can we detect income disruption automatically and trigger payouts instantly?

That’s the foundation of parametric protection.


**

The Idea: Parametric Income Protection

Instead of asking:

«"Did the user file a claim?"»

We ask:

«"Did the worker’s earning environment degrade?"»

If yes → trigger payout automatically.

No claims. No paperwork. No waiting.

This is what KAVACH attempts to solve.


System Overview

KAVACH combines three main components:

  1. Real-time disruption detection
  2. ML-based earnings prediction
  3. Automated payout engine

The flow looks like this:

External Data → Disruption Detection → Income Prediction → Loss Calculation → Auto Payout


Real-Time Disruption Detection

We aggregate multiple data sources:

  • Weather APIs (rainfall, alerts)
  • AQI feeds
  • Disaster indicators
  • Geo-based environmental signals

These inputs are normalized and converted into disruption scores per location.

Example:

Heavy rain + AQI spike + low visibility
→ High disruption score
→ Trigger evaluation

The system runs continuously and flags abnormal conditions.


Earnings Prediction Model

This is where ML comes in.

We estimate expected earnings for a worker using:

  • Historical earnings
  • Time of day
  • Day of week
  • Location demand patterns
  • Weather sensitivity
  • Behavioral trends

We used:

  • XGBoost regression model
  • Feature engineering for time series signals
  • Rolling baseline computation
  • Dynamic adjustment windows

Output:

Expected earnings today: ₹1200
Actual earnings detected: ₹540
Loss detected: ₹660

This becomes the payout base.


Automated Payout Engine

Once disruption + income drop is confirmed:

  1. Risk score is computed
  2. Fraud checks are applied
  3. Loss amount validated
  4. Payout triggered

Payout happens via:

  • UPI transfer
  • Instant disbursement logic
  • Rule-based caps

The goal is:

Minutes, not days.


Fraud & Abuse Prevention

Parametric systems are vulnerable without safeguards.

We added:

  • Anomaly detection on earnings
  • Location spoofing checks
  • Sudden behavioral deviation filters
  • Multi-factor validation scoring

Only validated losses trigger payouts.


Why This Matters

This isn’t just about insurance.

It’s about:

  • Financial resilience
  • Predictable income
  • Gig worker stability
  • Instant safety nets

For millions of workers, a single disrupted day matters.

KAVACH tries to make that risk invisible.


What We Built During the Hackathon

In the hackathon timeframe, we implemented:

  • Disruption detection pipeline
  • ML income baseline model
  • Loss calculation engine
  • Decision trigger logic
  • Simulated payout flow
  • Dashboard for monitoring

Still rough. Still evolving. But functional.


Tech Stack

Backend

  • Python
  • FastAPI
  • Real-time ingestion

ML

  • XGBoost
  • Pandas
  • Feature engineering pipeline

Data

  • Weather APIs
  • AQI feeds
  • Synthetic earnings dataset

System

  • Decision engine
  • Rule evaluator
  • Risk scoring module

Challenges We Faced

Data scarcity
Real gig-worker earnings data is not easily available.

Dynamic environments
Weather impact varies across cities.

False positives
Not every income drop is disruption-based.

Payout fairness
Avoiding over-compensation.

Each of these required iterative tuning.


What’s Next

  • Better earnings prediction models
  • Real gig platform integration
  • Geo-level risk calibration
  • Live payout simulation
  • Mobile interface
  • Policy engine tuning

This is still early — but the direction is clear.


Team

Built during Guidewire DEVTrails by:

  • Anisha
  • Compilation
  • Flux
  • Fresh
  • Priyanshu

Different roles, shared goal — build something meaningful.


Final Thoughts

Hackathons usually produce demos.
We tried building something closer to a product.

KAVACH explores a simple idea:

If risk can be detected automatically, protection should be automatic too.

Still early. Still imperfect.
But worth building.

Seed Phase 2 is coming. Let’s go.

Top comments (0)