Назад к подготовке

ML System Design

Design a similar-items recommender for 1M items when the current collaborative model fails on cold-start items and misses semantic similarity.

Ответить самому

Сначала сформулируйте ответ как на собеседовании, затем откройте разбор и оцените себя.

Загрузка

Короткий ответ

Build item embeddings from content modalities, retrieve nearest neighbors with ANN, then refine with feedback-trained ranking or metric learning. Keep collaborative signals as features where available, but do not depend on them for new items.

Полный разбор

Start by clarifying the action. This is item-to-item retrieval: for an anchor item, return similar and useful items. The existing collaborative model has cold-start and semantic-similarity gaps, so the first layer should use content that exists for new items: text, images/video frames, metadata, genres, actors, tags and behavioral aggregates when available.

Generate item embeddings with modality-specific encoders and store them in an ANN index. For cold-start items, content embeddings are enough to produce neighbors. For warm items, add collaborative/feedback signals in a reranker or fine-tuning stage.

The target should not be only visual/textual similarity. The prompt explicitly asks for user feedback, so train or rerank using positives such as clicks, watches, purchases, likes or long watch time, and negatives such as skips, dislikes or exposed-but-ignored items. The system should output candidates, rerank them, filter business constraints and log impressions for evaluation.

Теория

Cold start is solved by features available before interaction history; feedback relevance is solved by learning from interactions after retrieval.

Типичные ошибки

  • Use only collaborative filtering despite the cold-start requirement.
  • Return nearest visual neighbors without user usefulness signals.
  • Forget ANN/index refresh for new items.

Как отвечать на собеседовании

  • Separate retrieval, training data, reranking and evaluation.
  • Mention what happens for brand-new items on day one.