Preparing your design workspace

Loading the problem and your latest saved attempt…

Design an Account Risk Detection and Learning Pipeline

Build account-level risk scores and a review-driven learning loop with honest evaluation under selective, delayed labels.

Problem statement

For this exercise, assume a social service uses an ML pipeline to identify accounts whose activity on a closed UTC day violates a supplied abuse policy.

The pipeline ingests authorized behavior events, builds account-level features, produces versioned risk scores, and sends selected account/day windows to authorized reviewers. A label describes the same closed activity window and may arrive up to seven days later.

An unreviewed or unresolved window has an unknown label. A daily review budget of 20,000 cases contains up to 19,000 risk-selected cases and 1,000 randomly audited cases across the remaining eligible population; retain the actual sampling probability and selection stratum.

One account/day window can create at most one review case, and every case keeps the exact feature snapshot, model and selection versions that produced it. Later rescoring or a corrected label must preserve earlier evidence.

Design event ingestion, point-in-time features, supervised training and calibration, batch scoring, review and label collection, honest offline evaluation, promotion and rollback. Missing features or failed scoring must remain explicit rather than silently making an account low risk.

Choose and justify a conventional model family; no particular vendor or neural architecture is required. Login challenges, payment authorization, individual-post moderation, automatic account penalties and authoring the abuse policy are outside scope.

For this exercise, fix the daily scoring cohort from authorized closed account/day windows before the job starts. Risk selection and random audits use the remaining ready-score population of that cohort.

Pending or unavailable scores stay outside case selection, but they still count toward the daily scoring-completion measurement and its coverage limitations.

What to build

  1. Accept authorized behavior events and expose reproducible account/day scores with feature, model and calibration versions or an explicit incomplete outcome.
  2. Select cases within the risk and random-audit budgets, avoid duplicate account/day cases, and record authorized, versioned labels and selection evidence for the exact reviewed window.
  3. Build point-in-time supervised datasets, train and calibrate a chosen model, evaluate delayed and selectively observed labels, and promote or roll back an immutable release while preserving historical evidence.

At scale

  • For this exercise, assume 100 million active accounts, one billion behavior events per day and a peak ingest rate of 100,000 events per second.
  • For this exercise, score 99% of eligible account/day windows within two hours of the UTC day closing, return stored-score queries within 200 milliseconds at p95, and keep the daily review budget at 20,000 cases including 1,000 random audits.
  • For this exercise, events may be duplicated or arrive late and labels may be delayed by up to seven days; retain authorized feature evidence, scores, review labels and reproducible dataset artifacts for 90 days.
  • For this exercise, target 99.9% monthly ingestion and stored-score-read availability across multiple zones; an acknowledged event must survive a process or zone failure, and incomplete scoring is reported explicitly.