Lyft needed a driver safety score that reflected real-world conditions rather than a single static threshold.

A fixed cutoff caused unfair penalties and reduced driver trust, hurting reliability and engagement.

The team solved it by: 👉 Collect per-second sensor streams from driver phones. 👉 Detect harsh events with ML models and enrich them in the Smooth Cruiser pipeline. 👉 Store daily scores in DynamoDB for low-latency app lookup.

The parts that matter: 1️⃣ Apache Airflow DAG - orchestrates the parallel ETL pipeline 2️⃣ Smooth Cruiser pipeline - enriches rides with location-based risk and computes scores

Scores update once a day and reflect drivers' typical behavior across 100 rides, giving transparent feedback while handling billions of events.

The 100-ride rolling window avoids overreacting to a single event, but a shorter window would react faster and a longer window would be slower. Lyft chose the middle ground, accepting some latency in score changes to keep the metric stable and meaningful.

How do you decide the right window size for behavior-based scoring in your own systems?