Principle:24kchengYe MemoMind Hybrid Retrieval
| Knowledge Sources | |
|---|---|
| Domains | Information_Retrieval, NLP |
| Last Updated | 2026-10-28 00:00 GMT |
Overview
Retrieval strategy that combines multiple independent search methods—semantic (vector), lexical (BM25), graph (link traversal), and temporal—in parallel to capture different aspects of relevance, then fuses their ranked results.
Description
No single retrieval method captures all relevance signals. Semantic search matches meaning but misses exact keywords; BM25 matches exact terms but misses synonyms; graph retrieval finds related facts through connections but may miss direct matches; temporal retrieval filters by time but ignores content relevance.
Hybrid retrieval runs all four methods in parallel for each fact type, then fuses the ranked result lists. This ensures that a fact relevant by any signal is surfaced. The parallelization reduces latency compared to sequential execution.
The four methods:
- Semantic: HNSW vector search using query embedding cosine similarity
- BM25: PostgreSQL tsvector full-text search with tf-idf scoring
- Graph: MPFP/BFS/LinkExpansion traversal from semantic seeds through the memory graph
- Temporal: date-range filtering combined with semantic matching
Usage
Use this principle when a single retrieval channel is insufficient and the system needs to balance precision (BM25, temporal) with recall (semantic, graph). It is the standard approach for production RAG and memory retrieval systems.
Theoretical Basis
Each retrieval method produces a ranked list of results for the same query:
# Abstract parallel retrieval (not real implementation)
semantic_results = semantic_search(query_embedding, bank_id, fact_types)
bm25_results = bm25_search(query_text, bank_id, fact_types)
graph_results = graph_traverse(query_embedding, bank_id, fact_types, budget)
temporal_results = temporal_search(query_embedding, bank_id, fact_types, date_range)
# Fuse all ranked lists
merged = reciprocal_rank_fusion([
semantic_results, bm25_results, graph_results, temporal_results
])
The parallel execution is batched: semantic+BM25+temporal share a single database connection (combined CTE query), while graph retrieval runs per fact type in parallel asyncio tasks.
Related Pages
Implemented By
- Implementation:24kchengYe_MemoMind_retrieve_all_fact_types_parallel
- Implementation:24kchengYe_MemoMind_Core_Response_Models
- Implementation:24kchengYe_MemoMind_Link_Expansion_Retrieval_Standalone