Preparing your design workspace

Loading the problem and your latest saved attempt…

Design Personalized Video-Rating Prediction

Predict a viewer's expected one-to-five rating for a video with reproducible training and low-latency serving.

Problem statement

For this exercise, assume viewers may submit an explicit one-to-five rating after watching a video. Given a viewer ID and video ID, the system returns an expected rating, a confidence indicator, and the model version used.

It must ingest rating events, prepare leakage-safe training data, train and evaluate reproducible model versions, serve predictions online, and provide a sensible cold-start fallback. One viewer's latest rating for one video is the supervised target; repeated delivery of the same rating version is idempotent.

Video upload, playback, search, recommendation-list assembly, advertising, comments, and content moderation are outside scope.

What to build

  1. Ingest versioned one-to-five rating events and retain their event-time provenance.
  2. Return an expected rating, confidence indicator, and model version for a viewer-video pair.
  3. Build leakage-safe datasets and train, evaluate, canary, and roll back reproducible model releases.

At scale

  • Assume 50,000 prediction requests per second at peak and 50 million active viewers over 100 million videos.
  • Return predictions within 100 ms at p95 with 99.9% availability.
  • Ingest up to 10,000 rating updates per second; updates may arrive late or be delivered more than once.
  • Refresh fast-changing rating aggregates within five minutes and full model releases daily.