Product Features40 minutes

Video Analytics

Fix a daily view report.

Task

Build a video-analytics service that produces a daily view report from playback events.

Requirements

  1. Return [{video_id, views, unique_viewers}], sorted by views descending, then video_id ascending.
  2. Dates are inclusive YYYY-MM-DD UTC dates. Input timestamps are valid ISO timestamps with Z or an explicit offset.
  3. Keep the first occurrence of each event id BEFORE filtering dates. A retried event cannot move into another day.
  4. Count every retained event as a view and distinct user_id values as viewers. Do not mutate input. Reject a reversed date range with ValueError containing date.
How you are graded
  • Decomposition 15%
  • Prompting the assistant 15%
  • Verification 20%
  • Judgment about AI output 15%
  • Correctness 25%
  • Communication 10%

Scores use evidence from your session. A short or incomplete session may not provide enough evidence for every skill. See a sample scorecard

Interview guidance

Here is a video dashboard whose daily report overcounts. Use the AI assistant however you like; I am more interested in how you check its work than in how fast you type. Start by telling me which requirement you think is easiest to get wrong, then make the checks pass.

  • AI is allowed and expected: your own Claude, OpenAI or Gemini key, or the free in-browser model.
  • You are graded on how you drive and check the AI, not on how much you prompt.
  • Run the checks; read what fails.
  • A new requirement will arrive partway through.
  • Too little AI use is reported as “not enough to grade”, never as a fail.
You will answer 6 debrief questions at the end
  • What did you delegate to the AI, and why?
  • Name one AI suggestion you rejected or changed, and why.
  • Choose one block the AI helped write. Explain what each line does and which test verifies it.
  • What is still risky, and what would you test or ship next?
  • Why must a short play still claim its event id when it does not count as a view?
  • If the report had to include events that arrive a day late, what would you change and how would you test it?