Skip to main content

Dense embeddings vs BM25 lexical vs Hybrid + Reranking

Why does pure vector search fail on product codes/names, and how do Hybrid Search + Reranking fix it?

Official Reference

Model Answer & Explanation

Dense embeddings capture semantic paraphrases ('billing failure' ~ 'card declined') but blur exact tokens like error codes (ERR_409), SKUs, or function names. BM25 / Postgres full-text search nails exact keywords. Combine both top-K lists using Reciprocal Rank Fusion (RRF), then pass the top ~30–50 candidates to a slower, far more accurate cross-encoder reranker to keep the top 5–8.

Follow-up Interview Question · Why can’t you run a cross-encoder over 100,000 chunks directly at query time?

Module Context & References

Applied AI & RAG · Popular interview theory Widely asked LLM, retrieval, grounding, agent and evaluation questions
Personal Notes · Markdown

Technologies & Interview Topics Covered

Switch between short-term interview tracks and long-term 80/20 engineering depth to practice JavaScript internals, React rendering and hooks, timed frontend machine coding UI challenges, MeetaPro FG300, Blind 75 & NeetCode 150 DSA patterns, Python & FastAPI APIs, PostgreSQL query optimization & MVCC, Redis caching, Applied AI RAG pipelines & evaluations, and distributed system design.