Advanced
Open
Pro
Argue For and Against Generative Retrieval Versus Two-Tower Plus ANN
Part of the ML System Design Interview path →
Part of the Search, Recommendation & NLP Systems path →
Your team runs a two-tower retriever with an HNSW index over 50M items and a ranker on top. A principal engineer proposes replacing retrieval with a TIGER-style generative retriever: encode each item's content into a short tuple of semantic IDs with a residual-quantization autoencoder (RQ-VAE), and have a Transformer decode the next item's ID tuple with beam search. You are asked to write a one-page recommendation.
- Explain how semantic IDs are produced and why similar items share prefixes.
- Show by arithmetic whether 3 levels with 256 codes each can identify 50M items, and what you would change.
- List the advantages the proposal claims (especially cold start) and the specific costs and risks (latency, freshness, ID drift, invalid generations, ranking features).
- Describe the evaluation you would run before any migration and what must be true for a launch.
- Give a lower-risk hybrid and say what claims in your memo are from memory and not measured.
Share this question