firehose> #llmops

Hybrid Retrieval

Run a keyword search and a semantic search in parallel over the same corpus, then fuse the two ranked lists into one. The move exists because each channel has the other's blind spot: Semantic Retrieval (vector/embedding) matches by meaning but is unreliable on literal strings and exact identifiers — an error code like error: connection refused, or a function name like useState, may not surface at all, because embeddings privilege sense over surface tokens. Keyword search (BM25 over an FTS index) is the inverse: exact on tokens, blind to paraphrase. Neither alone covers a memory store whose queries mix natural language with precise identifiers, so the practical answer is both, combined by Rank Fusion. In OpenClaw the weighting is ~0.7 vector / 0.3 keyword.

The corrective this concept carries into the Retrieval Maturity Levels ladder is that "just add semantic search" is not the terminal upgrade — semantic has a shape of failure (exact matches), and hybrid is the least-bad general default precisely when you can't guarantee the query shape in advance. It also composes downstream with Reranking (fuse first, then re-score the shortlist with a model). Note the counter-current: the Claude Code team started with a vector database and moved to grep + agentic search because it performed better and was easier to maintain — evidence that even the keyword half alone can beat the semantic half for a code-shaped corpus. Which channels you actually need is a Query-Shaped Storage decision, not a default.

Claims


Linked from