Code RoomSemantic search with filters
MediumPrep Room Coding #3839

Semantic search with filters

System designML systemsDatabases & SQLMid–Senior~35 min

Design a semantic-search service for an e-commerce catalog of ~30M products. Shoppers type natural-language queries ('warm waterproof jacket for hiking under $150') and expect relevant results in under 100ms p95 at ~3,000 QPS. Results must respect structured filters (price, in-stock, category) alongside semantic relevance, and the catalog changes constantly (price/stock updates every few minutes, new products hourly). Pure keyword search misses paraphrases and intent; pure vector search ignores exact constraints and known high-precision keyword matches.

What a strong answer looks like

Clarify scale and constraints first. Propose a clean component breakdown, then go deep on the hard parts (data model, bottlenecks, consistency, failure modes) and name the trade-offs you are making.

Clarify4:00 left
Estimate4:00 planned
Design11:30 planned
Deep dive9:30 planned
Failure6:00 planned
0:00
Which questions mattered is sealed until you submit. Telling you now would just be handing over the edge cases.