PracHub
QuestionsLearningGuidesInterview Prep
|Home/ML System Design/Salesforce

Design an end-to-end recommendation system

Last updated: Mar 29, 2026

Quick Overview

Design an end-to-end recommendation system evaluates ML product requirements, data/labeling, modeling, serving architecture, evaluation, monitoring, and trade-offs in a realistic interview setting. A strong answer states assumptions, handles edge cases, explains trade-offs, and shows how to validate the result clearly.

  • hard
  • Salesforce
  • ML System Design
  • Software Engineer

Design an end-to-end recommendation system

Company: Salesforce

Role: Software Engineer

Category: ML System Design

Difficulty: hard

Interview Round: Technical Screen

Design a movie recommendation system end to end. Clarify objectives (e.g., CTR, watch time, diversity), key signals (explicit ratings, implicit interactions), cold-start strategy, and a first modeling approach such as matrix factorization/NMF for user–item decomposition. Outline feature engineering, training data creation, offline evaluation (MAP/NDCG) and online A/B testing, freshness/real-time updates, and how you would roll out and monitor the system.

Quick Answer: Design an end-to-end recommendation system evaluates ML product requirements, data/labeling, modeling, serving architecture, evaluation, monitoring, and trade-offs in a realistic interview setting. A strong answer states assumptions, handles edge cases, explains trade-offs, and shows how to validate the result clearly.

Related Interview Questions

  • Design a recommendation system - Salesforce (medium)
|Home/ML System Design/Salesforce

Design an end-to-end recommendation system

Salesforce logo
Salesforce
Aug 1, 2025, 12:00 AM
hardSoftware EngineerTechnical ScreenML System Design
9
0

Design an end-to-end recommendation system

System Design Prompt: End-to-End Movie Recommendation System

You are tasked with designing an end-to-end movie recommendation system for a large-scale consumer platform. Assume a web/mobile product with millions of users and a catalog of tens of thousands of titles. Optimize for both user satisfaction and business impact under typical production constraints (latency, scale, and privacy).

Objectives

Clarify and prioritize measurable objectives, for example:

  1. Engagement: CTR, play-start rate, watch time, completion rate
  2. Satisfaction: rating after watch, thumbs up/down, long-term retention
  3. List quality: diversity/novelty/serendipity, coverage
  4. Business constraints: content promotion, age/region eligibility, licensing

Signals and Data

Identify key signals and data sources:

  1. Explicit feedback: ratings, likes/dislikes
  2. Implicit interactions: impressions, clicks, dwell time, watch-time ratio, replays, add-to-list, search queries
  3. Context: device, network, locale, time-of-day, session position
  4. Content metadata: genres, cast/crew, synopsis text, release year, maturity rating
  5. Embeddings: text/video/image embeddings for content similarity
  6. User attributes: new vs returning, inferred preferences

Cold-Start Strategy

Describe strategies for:

  1. New users: lightweight onboarding, popular/trending, contextual bandits
  2. New items: content-based similarity from metadata/embeddings, controlled exploration

Modeling (First Cut)

Propose a first modeling approach such as matrix factorization/NMF for user–item decomposition. State the objective, training procedure (e.g., ALS), and how it integrates into a two-stage system (candidate retrieval + ranking).

Feature Engineering

Outline features for retrieval and ranking:

  • User, item, and interaction features
  • Sequence/recency features
  • Cross features and constraints (eligibility, business rules)

Training Data Creation

Explain how to construct labeled datasets from logs, including:

  • Positive/negative definitions
  • Negative sampling
  • Time-based splits and leakage prevention
  • Debiasing (e.g., position bias)

Offline Evaluation

Specify offline metrics and setup:

  • Ranking metrics: MAP@K, NDCG@K, Recall@K, HitRate@K
  • Time-based validation and cold-start evaluation

Online A/B Testing

Design an A/B plan:

  • Primary/secondary metrics and guardrails
  • Power analysis, bucketing, and duration
  • Data logging and analysis plan

Freshness and Real-time Updates

Describe how user/item vectors and counters stay fresh:

  • Streaming updates, approximate real-time personalization
  • Incremental/periodic retraining

Rollout and Monitoring

Outline rollout and monitoring:

  • Staging/canary/ramp
  • Model/data drift, quality dashboards, alerting
  • Fallbacks and SLAs

Constraints & Assumptions

  • Preserve the scope, facts, inputs, and requested outputs from the prompt above.
  • If the prompt leaves a detail unspecified, state a reasonable assumption before relying on it.
  • Keep the answer interview-ready: concise enough to present, but concrete enough to implement or evaluate.

Clarifying Questions to Ask Guidance

  • Clarify users, core use cases, read/write patterns, scale, latency, availability, and data retention.
  • State explicit assumptions before making sizing or architecture decisions.
  • Prioritize the functional path first, then address reliability, security, observability, and rollout.

What a Strong Answer Covers Guidance

  • A scoped requirements summary with concrete non-goals and success metrics.
  • ML-specific data, model, evaluation, serving, and monitoring choices.
  • Reasoned trade-offs among simple and scalable designs, including bottlenecks and failure modes.
  • A validation, monitoring, migration, and launch plan appropriate for the risk level.

Follow-up Questions Guidance

  • What breaks first at 10x traffic or data volume?
  • How would you degrade gracefully during dependency failures?
  • What metrics and alerts would prove the design is healthy after launch?

Submit Your Answer to Earn 20XP

Sign in to leave a comment

Loading comments...

Browse More Questions

More ML System Design•More Salesforce•More Software Engineer•Salesforce Software Engineer•Salesforce ML System Design•Software Engineer ML System Design

Your design canvas — auto-saved

PracHub

Master your tech interviews with 9,000+ real questions from top companies.

Product

  • Questions
  • Learning Tracks
  • Interview Guides
  • Resources
  • Premium
  • For Universities

Browse

  • By Company
  • By Role
  • By Category
  • Topic Hubs
  • SQL Questions
  • AI Coding Questions
  • Compare Platforms
  • Discord Community

Support

  • support@prachub.com
  • (916) 541-4762

Legal

  • Privacy Policy
  • Terms of Service
  • About Us

© 2026 PracHub. All rights reserved.