Ranking TikTok Search Results Across Videos, Users, Sounds and Hashtags

Last updated: November 29, 2026

Quick Overview

Design the ML ranking system behind TikTok search, where a single query can match videos, creator accounts, sounds, hashtags and products, and the results page must blend these types into one ordered list.

TikTok
ML System Design
Machine Learning Engineer
TikTok
November 29, 2026
Machine Learning Engineer
System Design Round
ML System Design
Medium

0

0

0 solved


Design the ML ranking system behind TikTok search, where a single query can match videos, creator accounts, sounds, hashtags and products, and the results page must blend these types into one ordered list.

Many younger users treat TikTok search as a discovery engine, so search quality matters for engagement and ads. This ML design question checks multi-stage retrieval and ranking, handling heterogeneous result types, query understanding for short and multilingual queries, and freshness for trends.

What the Interviewer Expects
  • Lay out query understanding, retrieval, ranking and blending stages
  • Use both lexical and embedding retrieval per entity type
  • Define labels from search engagement, not just clicks
  • Explain how heterogeneous result types are blended on one page
  • Handle freshness for trending queries
  • Pick offline and online metrics
Key Topics to Cover
learning to rank
hybrid retrieval
query understanding
result blending
position bias
How to Approach This
  1. Start by mapping the business objective to a concrete ML objective and metric.
  2. Cover the full pipeline: data collection, feature engineering, model selection, training, serving.
  3. Discuss online vs offline evaluation. Plan an A/B test to validate real-world impact.
  4. Address the serving latency budget and whether batch or real-time inference is needed.
  5. Think about the data flywheel: how user feedback improves the model over time.
Possible Follow-up Questions
  • How do you correct for position bias in click labels?
  • A query like 'outfit' should show both videos and Shop products. How do you decide the mix?
  • How do you handle a sudden trend whose name did not exist yesterday?
Sharpen Your Skills on Codemia

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

Practice ML System Design Problems
Sample Answer
Requirements
  • Return a blended page within about 200 ms p99.
  • Entity types: videos, users, sounds, hashtags, LIVE rooms, Shop products.
  • Support misspellings, slang and many languages; boost fresh content for t...
High-Level Design
  1. Query understanding: normalization, spell correction, language ID, intent classifier (find a person, find a sound, browse a topic, shop), and entity linking to known creators and hashtags.
  2. *...

Submit Your Answer
Markdown supported