Yashotantra Academy logo

3 · Advanced RAG Architectures

3. Hybrid Search & Cross-Encoder Reranking

Combining sparse BM25 with dense vectors, Reciprocal Rank Fusion (RRF), and Cohere rerankers.

11 min read · 2 MCQs

The Blind Spot of Dense Vectors

Dense embeddings excel at conceptual meaning ('automobile' matches 'car') but struggle with exact alphanumeric identifiers (part numbers, error codes, product SKU 'X-902'). Hybrid search pairs dense vector search with sparse keyword search (BM25) to cover both modalities.

Two-Stage Retrieval & Rerankers

Stage 1: Retrieve the top 50 candidates using fast approximate nearest neighbors (HNSW). Stage 2: Pass the query and candidates through a cross-encoder reranker that computes all-to-all attention across query-document pairs, compressing the list to the top 5 most relevant chunks.

Chapter quiz

2 questions · pass mark 75%
  1. 1. What is the main weakness of pure dense vector search in RAG?

  2. 2. How does a Cross-Encoder Reranker differ from Bi-Encoder Vector Search?