Design Search Ranking for Facebook Marketplace Listings

Last updated: November 29, 2026

Quick Overview

Design the ML system that ranks Marketplace listings for a text query, accounting for relevance, distance, price, listing quality, and the chance the buyer actually messages the seller.

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

0

0

0 solved


Design the ML system that ranks Marketplace listings for a text query, accounting for relevance, distance, price, listing quality, and the chance the buyer actually messages the seller.

Marketplace search is a two-sided local market, which makes it distinct from Feed ranking. Interviewers check how you combine text relevance with locality, choose a transactional label, and handle scams and stale listings.

What the Interviewer Expects
  • Query understanding (category, attributes, intent)
  • Retrieval with both lexical and semantic matching within a geographic radius
  • Label choice: message seller or completed sale rather than click
  • Features for locality, freshness, price competitiveness, seller trust
  • Fraud and scam handling, sold-item removal
Key Topics to Cover
Search ranking
Semantic retrieval
Geo filtering
Learning to rank
Trust and safety
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 would you handle a query like 'cheap couch' that mixes intent and attribute?
  • How would you avoid one seller with 200 listings dominating results?
  • How would you evaluate a change when sales happen off platform?
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

Objective: connect buyers with listings they will act on. Primary label: buyer messages seller within the session (strong intent), with click and save as auxiliary tasks. Sale completion is partia...

High-Level Design
  1. Query understanding: classify category, extract attributes (brand, size, price words like "cheap"), spell-correct, expand synonyms.
  2. Retrieval: inverted index with geo sharding (cells) pl...

Submit Your Answer
Markdown supported