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
November 29, 20260
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
How to Approach This
- Start by mapping the business objective to a concrete ML objective and metric.
- Cover the full pipeline: data collection, feature engineering, model selection, training, serving.
- Discuss online vs offline evaluation. Plan an A/B test to validate real-world impact.
- Address the serving latency budget and whether batch or real-time inference is needed.
- 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 ProblemsSample 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
- Query understanding: classify category, extract attributes (brand, size, price words like "cheap"), spell-correct, expand synonyms.
- Retrieval: inverted index with geo sharding (cells) pl...