---
title: "Manual 04: Hybrid Search & Cross-Encoder Reranking — RAG Canon"
description: "Technical implementation manual for Hybrid Search & Cross-Encoder Reranking in the RAG Canon."
image: "https://tinycto.tv/assets/rag-canon/rag_manuals_og.jpg"
canonicalUrl: "https://tinycto.tv/rag-canon/manuals/04-hybrid-search-reranking"
locale: "en"
---

# Engineering Manual 04: Hybrid Search & Cross-Encoder Reranking

## 1. The Failure of Pure Dense Retrieval
Pure dense vector search struggles with out-of-vocabulary technical acronyms, exact product SKUs, part numbers, and legal citations. Conversely, pure keyword search (BM25) fails on synonymy and semantic paraphrase. High-reliability RAG demands a hybrid approach.

### Reciprocal Rank Fusion (RRF)
RRF combines ranked candidate lists from heterogeneous retrieval algorithms without requiring calibrated score normalization:
$$\text{RRF Score}(d \in D) = \sum_{m \in M} \frac{1}{k + r_m(d)}$$
where $k$ is a smoothing constant (typically 60) and $r_m(d)$ is the rank of document $d$ in system $m$.

---

## 2. Two-Stage Retrieval with Cross-Encoders
- **Stage 1 (Candidate Generation):** Fast approximate search over vector and BM25 indices fetches top 50 to 100 candidate chunks.
- **Stage 2 (Cross-Encoder Reranking):** A deep transformer (e.g. bge-reranker-large) simultaneously evaluates the concatenated query-document pair, capturing cross-attention token interactions to filter the top 5 to 10 highest-quality passages.
