A visual representation of BM25 relevance scoring curves across different term frequencies

Implementing BM25 Ranking with Lucene: Precision, Tuning, and Production Trade-offs

BM25 is the default ranking function in Lucene and Elasticsearch, but most engineers never tune its parameters. This post unpacks the algorithm’s internals, practical configuration levers, and the production trade-offs that separate adequate search from great search.

September 12, 2026 · 8 min · 1690 words · martinuke0
Diagram of a hybrid retriever with sparse and dense branches feeding a reranker.

Build a Hybrid Sparse-Dense Retriever: A CV-Worthy RAG Side Project

Hands-on build guide for a hybrid sparse-dense retriever (BM25 + embedding reranking) with a from-scratch HNSW vector index. Real runnable code, architecture diagrams, and a roadmap to senior-level.

September 7, 2026 · 14 min · 2978 words · martinuke0
Diagram showing sparse and dense retrieval paths merging into a fused ranked list feeding a streaming generation loop.

Build a Hybrid Sparse-Dense Retriever from Scratch: A CV Project That Actually Signals Systems Skill

Step-by-step build of a real hybrid retrieval system that combines learned BM25 with dense embeddings, fuses scores, and streams answers — the kind of project that makes hiring managers stop scrolling.

September 7, 2026 · 12 min · 2506 words · martinuke0

BM25 Zero-to-Hero: The Essential Guide for Developers Mastering Search Retrieval

BM25 (Best Matching 25) is a probabilistic ranking function that powers modern search engines by scoring document relevance based on query terms, term frequency saturation, inverse document frequency, and document length normalization. As an information retrieval engineer, you’ll use BM25 for precise lexical matching in applications like Elasticsearch, Azure Search, and custom retrievers—outperforming TF-IDF while complementing semantic embeddings in hybrid systems.[1][3][4] This zero-to-hero tutorial takes you from basics to production-ready implementation, pitfalls, tuning, and strategic decisions on when to choose BM25 over vectors or hybrids. ...

January 4, 2026 · 4 min · 851 words · martinuke0
Feedback