PracHub
QuestionsLearningGuidesInterview Prep
|Home/ML System Design/Salesforce

Design a recommendation system

Last updated: Mar 29, 2026

Quick Overview

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

  • medium
  • Salesforce
  • ML System Design
  • Software Engineer

Design a recommendation system

Company: Salesforce

Role: Software Engineer

Category: ML System Design

Difficulty: medium

Interview Round: Technical Screen

##### Question Design a recommendation system for users and items: discuss model choice (e.g., NMF), data fetching with multiple servers and a reverse proxy, and data storage (user, item, and interaction tables).

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

Related Interview Questions

  • Design an end-to-end recommendation system - Salesforce (hard)
|Home/ML System Design/Salesforce

Design a recommendation system

Salesforce logo
Salesforce
Aug 4, 2025, 10:55 AM
mediumSoftware EngineerTechnical ScreenML System Design
5
0

Design a recommendation system

Design a User–Item Recommendation System

Context

You are asked to design an end-to-end recommendation service that suggests items to users. The service should include choices for the recommendation model, the serving architecture with multiple application servers behind a reverse proxy, and a storage schema for users, items, and interactions.

Assume: millions of users and items, primarily implicit feedback (views, clicks, purchases), and a p95 online latency target under 150 ms for the recommendation endpoint.

Tasks

  1. Model choice and approach
    • Explain a reasonable baseline (e.g., NMF/matrix factorization) and alternatives.
    • Discuss handling implicit vs. explicit feedback, cold start, and ranking.
    • Describe training cadence and evaluation.
  2. Data fetching and serving architecture
    • Describe how multiple stateless servers behind a reverse proxy will serve recommendations.
    • Cover caching, timeouts/retries, fallbacks, and model/feature serving calls.
  3. Data storage design
    • Propose schemas for user, item, and interaction data.
    • Include any derived tables (e.g., learned embeddings/factors) and indexing/partitioning choices.

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.