Dataford
Interview QuestionsInterview GuidesExperiencesMock InterviewsPricing
Get started

Choose Retrieval vs Ranking Stack

Hard
HardSystem DesignML RankingTwo-Tower ModelsRecommendation SystemsAsked 6 times

Problem

Product Context

ShopNow is a large e-commerce marketplace with a personalized home feed and search result page. The team is debating whether to introduce a two-tower retrieval model or continue scaling a more traditional learning-to-rank stack built on hand-engineered candidate generation and a pointwise ranker.

Scale

SignalValue
DAU45M
Peak recommendation/search QPS180K
Active catalog120M SKUs
New or updated items/day4M
Candidates scored today~3K per request
End-to-end p99 latency budget150ms

Task

Design the end-to-end recommendation/ranking system and explain when you would choose a two-tower model vs a traditional ranking approach for this product.

  1. Clarify the product objective and define success metrics for home feed and search-like surfaces.
  2. Propose a multi-stage architecture, including candidate generation, ranking, and optional re-ranking, and explain where a two-tower model fits.
  3. Compare at least two design options: (a) traditional retrieval + ranker and (b) learned two-tower retrieval + downstream ranker. State the tradeoffs in recall, latency, freshness, cost, and maintainability.
  4. Design the training and serving stack, including online vs batch features, feature store usage, index refresh, and fallback behavior.
  5. Define offline and online evaluation, including how you would detect if retrieval improves recall but hurts business metrics downstream.
  6. Identify key failure modes such as feature drift, training-serving skew, cold start, and stale embeddings, with mitigations.

Constraints

  • New items must become eligible for recommendation within 10 minutes of catalog ingestion.
  • 35% of traffic comes from anonymous or weak-history users.
  • Serving cost must stay under $0.001 per request at peak.
  • Some seller and pricing features are restricted and can only be used in aggregated form for compliance reasons.
  • The system must support both personalized browsing and high-intent query sessions without maintaining separate infrastructure unless clearly justified.
Practicing as: Engineering Manager interview at Salesforce

Hi, I'll play your Salesforce interviewer for the Engineering Manager role. Answer the question above like we're in the room, and I'll respond the way a real interviewer would.

Take this as a live interview session →

You are practicing as a guest. Sign up free to get your answer graded with AI feedback. Your draft stays right here.

Sign up freeI have an account
Sign up to unlock solutions
Two-Tower Models Interview QuestionsTop 50 ML Ranking Interview QuestionsSimple Tire Software Engineer Interview QuestionsSimple Tire Interview QuestionsSalesforce Engineering Manager Interview Questions
Next questions
LabelboxDesign Reliable Product Search RankingMediumSalesforceMonitor Marketplace Ranking After LaunchMediumSalesforceDesign Ecommerce Recommendation StackHard