HLAB field notes

Search Algorithms

Stories and analysis filed under Search Algorithms.

01 stories
Terminal screenshot of the Claude RAG CLI answering a question and citing local source files

Implement Okapi BM25 from scratch

Build the keyword-ranking function behind a local retrieval pipeline: preserve identifiers, calculate Okapi BM25 scores, and return deterministic ranked results without a search library.