RAGcore
Hybrid search (BM25 + dense)
Run keyword and vector search together and fuse the rankings.
What it is and why it exists
Dense retrieval catches paraphrases, BM25 catches exact terms; their failures barely overlap. Fusion combines them: Reciprocal Rank Fusion (score = Σ 1/(k + rank), k ≈ 60) needs no score calibration; weighted score fusion needs normalised scores.
Quick prototype
Run both, concatenate, dedupe.
In production, at scale
Both queries in parallel, RRF or tuned weighted fusion, top-50 candidates into a reranker, weights tuned on the eval set per corpus.
Vendors and tools
| Elasticsearch / OpenSearch | Hybrid queries with RRF or normalisation |
|---|---|
| Weaviate / Qdrant / Pinecone | Hybrid search modes |
| pgvector + Postgres FTS | Hybrid in one database with an RRF query |
On AWS: OpenSearch hybrid search with a normalization processor; Bedrock Knowledge Bases hybrid search on supported stores.
How it fails
- Adding raw BM25 and cosine scores on different scales
- Tuning weights on three queries
What the interviewer asks next
Why RRF and not score averaging?
BM25 scores are unbounded and corpus-dependent while cosine sits in [−1, 1]. RRF only uses ranks, so it’s robust without calibration.