MLCrack

    ML SYSTEM DESIGN (DEEP DIVES) · INTERVIEW QUESTION

    Search results must reflect inventory changes within one minute. Which parts of the architecture need that freshness?

    🔴 advanced · e-commerce search ranking

    Hint: Inventory and relevance have different freshness needs.

    Answer

    Inventory eligibility and deletions need a fast update path, while slower relevance embeddings can remain versioned.

    Interview reasoning

    State separate freshness SLOs and enforce final eligibility before rendering.

    Separate semantic relevance from hard purchase eligibility. Inventory changes need a fast path even if document embeddings refresh slowly. Build judgments and exposure-aware feedback at the query-product level, then assess query cohorts and purchase completion, not just clicks or aggregate NDCG.

    Worked example. A one-minute stock freshness SLO requires timely eligibility updates and a final inventory check.

    Validation

    Inject stock changes and deletions; verify rendered eligibility updates within the one-minute SLO.

    Monitor zero-result rate, inventory violations, query-level relevance and conversion; hold out later queries and new catalog items.

    Common pitfalls

    offline relevance improves while unavailable items dominate results

    Final filtering of only the top few results can leave no alternatives. Better offline ranking cannot repair unavailable products.

    Likely follow-up: How would you create relevance labels for product search without treating every non-click as irrelevant?