Hybrid Search Keeps Showing Up
Pure vector search misses exact phrases. Pure keyword search misses paraphrases. The RAG note combines them in OpenSearch. OpenClaw combines them as 0.7 vector plus 0.3 BM25 over Markdown memory files. Same split, two indexes.
Hybrid Search Keeps Showing Up
A short linking note. It only connects what the longer posts already say.
Two notes on this site describe retrieval as keyword search plus vector search, and they are talking about the same failure.
The RAG note calls it layer two. Pure vector search misses exact matches. The example there is the phrase “GDPR compliance”: a document that literally contains those words can fail to surface if you only embed it. Pure keyword search misses the paraphrase, the page that means the same thing and never uses the words. OpenSearch runs vector similarity and BM25 in one query and ranks by a weighted combination. Weaviate and Pinecone are named as other systems that can do the same split. The instruction at the end of that section is to tune search before tuning prompts, because retrieval quality decides response quality.
OpenClaw’s memory search writes the weights down. memory_search runs FTS5 BM25 and a vector search (sqlite-vec, or a JS fallback), then merges with a weight of 0.7 on the vector score and 0.3 on the text score. Scores under 0.35 are dropped. The default return is the top 6 chunks. The reason given is the same one: pure vector search misses exact terms, pure keyword search misses semantically related concepts.
The indexes are not the same object. One is a document index (OpenSearch, over files a parser already chunked). The other is SQLite over Markdown in ~/.openclaw/workspace/, chunks of about 400 tokens with 80 tokens of overlap. What they share is the refusal to trust a single signal.
The harness note puts retrieval one step earlier than offloading. A pointer to a bad chunk is still a pointer to garbage. Hybrid search is how both of these systems decide which chunk is worth addressing. How an agent keeps the files those chunks came from, a memory server versus Markdown on disk, is Two ways to give an agent memory. Where this sits in the loop is From loop to harness.
ciao