Skip to main content
The hosted Cognis service supports multiple retrieval strategies that control how memories are searched and ranked. The default strategy (COGNIS) works well for most cases, but you can switch strategies for specific use cases.

Available Strategies

StrategyDescriptionBest For
COGNISOptimized hybrid pipeline (default). Vector + BM25 + RRF fusion with recency boostGeneral-purpose memory retrieval
FOUR_WAY_TEMPRSemantic + BM25 + Graph with Hindsight patternComplex relationship queries
MULTI_QUERY_RAGGenerates 5 query variants + HyDE + RRF fusionAmbiguous or broad queries
SINGLE_QUERYSimple vector search without BM25 or fusionFast, straightforward lookups
SIMPLEMEM_ADAPTIVEAdaptive k based on query complexityVariable-complexity workloads
RFM_EVIDENCE_POOLIterative gap-filling retrievalResearch and evidence gathering

Default Behavior

The COGNIS strategy is used by default for all search() and context() calls. It combines:
  1. Matryoshka vector search (256D shortlist → 768D rerank)
  2. BM25 keyword matching
  3. Reciprocal Rank Fusion (70% vector, 30% BM25)
  4. Recency boost with exponential decay
  5. Temporal query detection
This is the same pipeline architecture used in the open-source hybrid search.
The open-source lyzr-cognis package uses the COGNIS (hybrid RRF) strategy only. Multiple retrieval strategies are a hosted-only feature.