Engineering Features From Partial Video Watch Sequences

Last updated: November 29, 2026

Quick Overview

Raw logs record, for every impression, how many seconds a user watched and the video's length. Design features from this data for a model predicting whether a user will like the next video.

TikTok
Machine Learning
Machine Learning Engineer
TikTok
November 29, 2026
Machine Learning Engineer
Technical Screen
Machine Learning
Medium

0

0

0 solved


Raw logs record, for every impression, how many seconds a user watched and the video's length. Design features from this data for a model predicting whether a user will like the next video.

Watch behavior is TikTok's richest implicit feedback signal, so feature engineering on watch time comes up often. Interviewers check that you normalize for video length, use sequences and time decay, and avoid leaking the label.

What the Interviewer Expects
  • Normalize watch time by video length and cap loops
  • Create user-level aggregates over multiple time windows
  • Build user by category or creator affinity features
  • Use recent sequence features or embeddings of watched videos
  • Avoid label leakage and training-serving skew
Key Topics to Cover
feature engineering
implicit feedback
sequence features
time decay
label leakage
How to Approach This
  1. Understand the bias-variance trade-off. High training accuracy but low test accuracy signals overfitting.
  2. Choose evaluation metrics carefully based on the problem. Accuracy alone is often insufficient.
  3. Feature engineering is often more impactful than model selection.
  4. Know when to use tree-based models (tabular data) vs neural networks (unstructured data).
  5. Handle class imbalance with SMOTE, class weights, or appropriate loss functions.
Possible Follow-up Questions
  • How do you treat videos that loop multiple times?
  • How would you represent the last 50 watched videos?
  • Which features need to be computed in real time?
  • How would you detect a leaky feature?
Sharpen Your Skills on Codemia

Practice similar problems with our interactive workspace, get AI feedback, and track your progress.

Explore ML Interview Prep
Sample Answer
Clarify

The label is a like on the next video. Ask what other signals exist (video category, creator, sound), latency budget, and whether features can be computed in streaming or only in daily batch....

Approach

Raw seconds watched depend on video length: 10 seconds is a full watch of a 10-second clip and a skip of a 3-minute video. So normalize, then aggregate across windows, entities and sequences....


Submit Your Answer
Markdown supported