v2.12.0 — Hybrid Search, 3-Layer Retrieval & Temporal Weighting
What's New in v2.12.0
FTS5 Hybrid Search
Full-text search index (SQLite FTS5) now runs alongside semantic vector search. Every recall scores both paths — BM25 keyword rank and cosine similarity — then merges them via weighted fusion (HYBRID_SEARCH_TEXT_WEIGHT, default 0.35). Queries that miss the embedding model (stop words, unstemmed terms) now fall through to a LIKE fallback instead of returning empty.
3-Layer Retrieval
marm_smart_recall now accepts a detail parameter (1/2/3):
- detail=1 — summary view (~200 chars). Default. Lowest token burn.
- detail=2 — context view (~500 chars).
- detail=3 — full memory content.
Truncation is applied on-read with no schema changes — works immediately on all existing memories. Agents choose the depth they need; the 1MB response limiter now budgets against truncated sizes so you get more results, not fewer.
Temporal Weighting
Recent memories rank higher. An exponential half-life decay score (default 30-day half-life) is blended additively into hybrid scores via TEMPORAL_WEIGHT (default 0.1 — conservative, additive only). Set TEMPORAL_WEIGHT=0 for exact v2.11.0 ranking behavior.
Configuration
Three new env-overridable settings with load-time validation and stderr warnings on out-of-range values:
HYBRID_SEARCH_TEXT_WEIGHT— FTS vs vector blend (default: 0.35, clamped to [0, 1])TEMPORAL_WEIGHT— recency bias strength (default: 0.1, clamped to [0, 1])TEMPORAL_HALF_LIFE_DAYS— half-life for decay (default: 30, minimum 1)
Tests
44 new tests across three new test files: test_hybrid_search.py, test_3layer_retrieval.py, test_temporal_weighting.py. Smoke harness at scripts/test-scripts/smoke_hybrid_search.py for weight tuning.
Upgrade
pip install --upgrade marm-mcp-serverOr pull the latest Docker image:
docker pull lyellr88/marm-mcp-server:latestNo database migrations required. All changes are backward compatible — existing memories work without any modification.