MLCrack

    RECOMMENDATION SYSTEMS · INTERVIEW QUESTION

    What is two-tower architecture?

    🟢 beginner · Recommendation Systems

    Hint: Focus on the decision rule, assumptions, and failure mode behind recommendation systems.

    Answer

    Two-tower models embed users/queries and items separately for fast nearest-neighbor retrieval. They are efficient for candidate generation.

    Interview reasoning

    Two towers enable precomputed item vectors; a cross-feature ranker models richer user-item interactions after retrieval. They solve different serving-cost problems.

    A two-tower model encodes user/context and item information separately and trains their similarity to retrieve useful items. Item vectors can be precomputed into an ANN index; user vectors reflect recent context. A richer cross-feature ranker can then evaluate the bounded retrieved pool.

    Worked example. An item-tower update requires compatible indexed vectors before traffic moves to the new encoder.

    Validation

    Compare candidate recall and reranked utility with compatible embedding versions.

    Measure exact and ANN recall, new-item quality, index freshness and retrieval latency; verify both towers' feature versions.

    Common pitfalls

    A jointly encoded cross model usually cannot score the whole catalog at interactive scale.

    Separately encoded towers cannot represent every pairwise interaction. Mixed encoder/index versions can fail even when each component works independently.

    Likely follow-up: Compare candidate recall and reranked utility with compatible embedding versions.