Building and Testing a Hybrid RAG Pipeline: Dense Search, BM25, RRF and Reranking
Affectionate_Slip654 · reddit · 2026-10-05
The author built ReRankEval, a hybrid retrieval pipeline combining Dense Search + BM25 → Reciprocal Rank Fusion (RRF) → LLM reranking → answer generation, and benchmarked it against three baselines (vector-only, BM25-only, and hybrid without reranking) on five real financial/payments documents and ten hand-verified questions, with a real comparison table.
Key takeaways:
- The real difference between dense vector search and BM25 keyword search
- What RRF is, why raw scores can't be compared directly, and the exact formula
- Why a reranker is fundamentally different from a retriever and what it actually judges
- Evaluating RAG pipelines with Hit Rate, MRR, and NDCG
- Designing ingestion-side and query-time sides of a hybrid retrieval architecture
- A production-style codebase layout: ingest → vectorstore → sparseretriever → fusion → reranker → pipeline → generate → eval
Stack: Python, Qdrant, rankbm25, EURI LLM Gateway, custom RRF, prompt-driven LLM reranker, pdfplumber. Full code is open-sourced on GitHub with a YouTube walkthrough.
More from coding & agent
- Claude Opus Configures Karabiner Media Keys End-to-End, No Human Hands — cantrell · 2026-11-29
- Agentic GraphRAG unifies enterprise knowledge and agent memory in one traversable graph — vm324234 · 2026-11-29
- Coding agent blocked from npm rewrote the whole package from memory — and it worked — Panther1537 · 2026-11-29
- AI agents solve 909 open math problems in 2 days on 18-year-old's Left to Solve site — julianibarz · 2026-11-29
- 'Verification is AI's next trillion-dollar category' — proof checkers, evals, agents auditing agents — McDonaghMatthew · 2026-11-29
- Vibe-codevember day 28: 'Hive', a Three.js creative coding demo built with AI — thespite · 2026-11-29