{ "lesson": "22-embedding-models-deep-dive", "title": "Embedding Models — The 2026 Deep Dive", "questions": [ { "stage": "pre", "question": "What is a dense embedding?", "options": [ "One fixed-size vector per text where cosine similarity ranks passages by semantic proximity", "A token-level alignment matrix", "A sparse weight per vocab token", "A graph over documents" ], "correct": 0, "explanation": "Dense embeddings give one vector per text (typically 384-3072 dim); cosine ranks similarity." }, { "stage": "pre", "question": "What does Matryoshka Representation Learning enable?", "options": [ "Faster softmax", "Multilingual training", "Cross-encoder rescoring", "Truncating a trained embedding to its first N dimensions and getting a still-useful smaller embedding" ], "correct": 3, "explanation": "Matryoshka training makes the first N dims of the vector standalone-useful, enabling cheap truncation." }, { "stage": "check", "question": "How do multi-vector (ColBERT) embeddings score query-doc pairs?", "options": [ "Cosine of mean-pooled token vectors", "Cross-entropy", "MaxSim: for each query token find the most similar document token, then sum the maxima", "Earth-mover's distance" ], "correct": 2, "explanation": "ColBERT-style late interaction uses MaxSim across per-token vectors." }, { "stage": "check", "question": "What does BGE-M3 output simultaneously?", "options": [ "Only a sparse vector", "Only a dense vector", "Dense, sparse, and multi-vector (colbert) representations from one model in a single inference", "Only a colbert vector" ], "correct": 2, "explanation": "BGE-M3 emits three retrieval modes from one model, useful for fused hybrid scoring." }, { "stage": "check", "question": "Why must you re-normalize a Matryoshka-truncated vector before cosine similarity?", "options": [ "Truncation changes the vector norm; without re-normalizing, dot product no longer equals cosine", "Cosine ignores normalization", "Truncation breaks training", "Required by FAISS only" ], "correct": 0, "explanation": "Re-normalizing after truncation restores unit norm so dot product equals cosine again." }, { "stage": "post", "question": "Why do BGE models often need a query-side prefix string?", "options": [ "To compress queries", "Prefixes change tokenizer behavior", "Required by FAISS", "BGE was trained with an explicit query prompt; omitting it costs 3-5 points recall" ], "correct": 3, "explanation": "BGE models expect a 'Represent this sentence for searching...' prefix on queries." }, { "stage": "post", "question": "Why is MTEB necessary but not sufficient for picking an embedding model?", "options": [ "MTEB only covers English", "MTEB rewards bigger models", "MTEB ignores latency", "Leaderboard ranks are average across many tasks; your specific domain may differ, so always benchmark on your data" ], "correct": 3, "explanation": "MTEB averages across tasks; domain-specific eval can flip the ranking." }, { "stage": "post", "question": "When should you add SPLADE sparse retrieval alongside dense embeddings?", "options": [ "On small corpora only", "Whenever the encoder is multilingual", "When queries are keyword-heavy or contain identifiers/codes that dense embeddings blur", "Whenever Matryoshka is used" ], "correct": 2, "explanation": "SPLADE captures lexical/keyword matches that dense models can miss; fuse with dense via RRF." } ] }