M9-042M9: Senior ML & AI System DesignRisk, Pricing & Large-Scale RetrievalHard
⚡Flashcard Drill➔Mastery:
Design a Hybrid SPLADE + Dense Vector Retrieval Engine with Selectivity-Aware Pre-Filtering
🎯 Active Recall Self-Check (Draft First, Verify After)
Login-free practice tracker: recall core answer, audit pitfalls, and log review status.
Step 1 · Draft your concise answer & assumptions
Step 2 · Check Pitfalls & Follow-up Inquiries
📐 Mathematical Definition
⚡ One-Sentence Core Answer
Pair learned sparse expansion (SPLADE) with dense embeddings, and dynamically switch between exact pre-filter scans and inline HNSW traversal based on filter selectivity.
📌 Key Takeaways
- •L1 Sparse-Dense Synergy: SPLADE preserves exact SKU/acronym recall plus learned term expansion where dense embeddings blur specifics
- •L2 Unified Hybrid Index: co-locate Dense HNSW and Sparse inverted postings in Qdrant/Vespa for single-pass scoring
- •L2 Selectivity Cliff: below ~1% filter selectivity, standard HNSW pre-filtering fractures graph connectivity and drops recall sharply
- •L3 Cost-Based Query Planner: estimate filter cardinality via histograms—run inline HNSW above ~5% selectivity and exact SIMD scan over bitmap IDs below ~1%
📐 Mathematical Derivations
SPLADE computes term weights via regularized by to keep inverted posting lists sparse.
🏭 Production Trade-offs
1) RRF avoids fragile score normalization across sparse/dense distributions, whereas calibrated convex weights outperform when tuned on golden pairs; 2) Prune SPLADE weights to Top-128 non-zeros.
⚠️ Common Interview Pitfalls
- ✕Running unguided HNSW pre-filtering on tight 0.2% tenant/date slices where graph traversal stalls
- ✕Training SPLADE without FLOPs sparsity regularization, bloating inverted posting lists with stop-words
🎯 Interviewer Follow-up Inquiries
- ?How does ACORN two-hop predicate-aware graph traversal bridge the 1%-5% selectivity gap cleanly?
- ?How do you adapt SPLADE lexical expansion when supporting mixed CJK and English enterprise corpora?
⚡
Test muscle memory on this topic via 3-Layer Flashcards
Active Recall: Mentally formulate Prompt ➔ Math Derivation ➔ Benchmark Implementation in 3 minutes.
📚