Day 80 of 133
Retrieval strategies: dense / sparse / hybrid / HyDE
BM25 + dense fusion; HyDE; multi-query; multi-hop.
DSA · NeetCode 2-D DP
- Burst BalloonsDSA · 2-D DP
Interview questions to prep
- State the 2-D DP: indices, recurrence, base case. What's the order of fill?
- Can you reduce 2-D to 1-D by reusing rows or columns? Walk through the dependency direction.
- Top-down with memoization vs bottom-up — which is easier to reason about, and which is faster in practice?
GenAI · Retrieval strategies
Interview questions to prep
- When does sparse retrieval (BM25) beat dense retrieval?
- How would you combine BM25 and dense scores in hybrid search?
- Given 30 failed RAG queries, how would you check whether the gold document appears in top-k before touching the generator?
- When would you add query rewriting, expansion, or hybrid search instead of changing the embedding model?
Interview questions to prep
- How does HyDE work, and when does it actually help?
- When would you decompose a query into multiple sub-queries?
Interview questions to prep
- How does DPR train a dense retriever, and how is it different from BM25?
- What positives and hard negatives would you use to train or fine-tune a retriever?
- When would DPR-style retrieval fail compared with sparse or hybrid search?
Interview questions to prep
- How would you handle a multi-hop question that requires chaining retrieval calls?
- What stopping criterion do you use for iterative retrieval — and how do you avoid runaway loops?
References & further reading
- Pinecone — Vector Databases Explained ↗Pinecone
- LangChain — RAG concepts ↗LangChain
- 75Hard GenAI/LLM — DPR for RAG ↗75Hard GenAI/LLM Challenge