Interview: you must ship an embedding service serving 100M vectors, 10ms p95 latency.
hardAnswer
- (1) Choose embedding model by quality + latency (E5-small / bge-small / OpenAI text-embedding-3-small).
- (2) Batch-embed the corpus offline.
- (3) Index in HNSW (Qdrant, pgvector, Weaviate) — M=32, .
- (4) Serve queries: encode + ANN.
- (5) Cache popular queries.
- (6) Sharding by partition key + horizontal scale.
- (7) Cold-index rebuild + hot-swap for updates.
- (8) Monitor: recall@k, latency percentiles, index memory.
- (9) Consider IVF-PQ if memory-constrained.
- (10) Backup index.
Check yourself — multiple choice
- Random
- Choose embed model by quality/latency + offline batch embed + HNSW index + shard + cache + hot-swap for updates + monitor recall/latency + IVF-PQ if memory tight
- Just brute force
- Not real
100M vectors 10ms: model choice + batch embed + HNSW + shard + cache + monitor.
#interview#applications
Practise Unsupervised Learning
214 interview questions in this topic.
Related questions
- Interview: 'you're asked to segment 10M customers — how?'
- Interview: 'design an unsupervised fraud detection system'.
- Interview: cluster 5M e-commerce customers for a marketing campaign.
- Interview: production fraud detector — daily volume 10M, current FN too high.
- Interview: design a recommender for a new streaming service.
- Interview: your model's accuracy dropped 15% overnight — how do you diagnose?