firehose> #llmops

How AI Agents Search Their Memory — Hybrid Retrieval, in Practice (OpenClaw)

TL;DR

Storing memory is only half the problem; the other half is finding the right entries at the right time without drowning the context window. This talk walks the full read path and lands on one thesis: keyword and semantic search each have the other's blind spot, so the practical default is Hybrid Retrieval — run BM25 keyword search and vector search in parallel and merge them with Rank Fusion — optionally refined by a model-scored Reranking pass over the shortlist. Semantic search alone breaks on exact identifiers (error codes, useState), which is why the keyword channel earns its place; tellingly, the Claude Code team dropped a vector DB for plain grep because it was better and easier to maintain (a concrete "no pain, no climb" for Agentic Simplicity). The second load-bearing idea is a context-discipline one: Search-Then-Get splits retrieval into a lean search (path, line numbers, score, ~700-char preview, citation) and a targeted get (fetch an exact line range), so only confirmed-relevant content reaches the window. The OpenClaw implementation grounds all of it — single SQLite DB with FTS5 + sqlite-vec, weighted fusion at 0.7 vector / 0.3 keyword, a 4× candidate over-fetch, a 0.35 score floor, and Incremental Indexing that hashes files and chunks to avoid re-embedding anything unchanged.

Concepts introduced

Held, not dropped

Themes the capture touches that don't warrant their own concept page yet (spin out on demand):

Key claims

Why this builds on the retrieval graph (and corroborates the simplicity thesis)

This is the read-path companion to the existing second-brain material, which stopped at Semantic Retrieval as "level 3" of Retrieval Maturity Levels. It builds on that spine rather than duplicating it: it sharpens level 3 by naming semantic search's exact-identifier failure mode and introducing the practical siblings that patch it — Hybrid Retrieval, Rank Fusion, Reranking — plus two production concerns the earlier material never reached, Incremental Indexing (keeping the index fresh cheaply) and Search-Then-Get (spending context only on confirmed-relevant content). The last one is the most firehose-aligned idea in the talk: it's the same "human attention / context window is the bottleneck" discipline, enforced by the shape of the tools rather than by prompt exhortation.

Two secondary stances worth flagging. First, a strong corroboration: the report that the Claude Code team abandoned a vector database for grep + agentic search is an independent, concrete instance of Agentic Simplicity's "complexity climbs, capability doesn't" — a fourth source now converges on it, and from the retrieval angle specifically. Second, a mild internal tension the video never resolves: its headline thesis is "hybrid is the answer," yet its most memorable data point is a team removing the semantic half entirely and being better off. The reconciliation is Query-Shaped Storage — for a code-shaped corpus queried by exact tokens, keyword alone fits; for a mixed-query memory store, you want both. The channel count is a query-shape decision, not a universal upgrade.

Illustrated walkthrough

Keyed by t=MM:SS, fusing each kept frame with the transcript segment it fell in.


Linked from