memory_hybrid_search
Combine keyword and semantic search with reciprocal rank fusion to find relevant memories using a single query, with optional date, tag, and metadata filters.
Instructions
Perform a hybrid search combining keyword (FTS) and semantic (vector) search.
Uses Reciprocal Rank Fusion (RRF) to merge results from both search methods, providing better results than either method alone.
Returns compact previews by default. Use content_mode="full" for complete content. Use memory_get to fetch full content for specific IDs.
Args: query: Search query text semantic_weight: Weight for semantic results (0-1). Higher values favor semantic similarity. Keyword weight = 1 - semantic_weight. Default: 0.6 (60% semantic, 40% keyword) top_k: Maximum number of results to return (default: 10) min_score: Minimum combined score threshold (default: 0.0) metadata_filters: Optional metadata filters date_from: Optional date filter (ISO format or relative like "7d", "1m", "1y") date_to: Optional date filter (ISO format or relative) tags_any: Match memories with ANY of these tags (OR logic) tags_all: Match memories with ALL of these tags (AND logic) tags_none: Exclude memories with ANY of these tags (NOT logic) content_mode: "preview" (default) returns truncated content_preview; "full" returns complete content preview_chars: Max chars for preview (default: 300, ignored when content_mode="full") fields: Optional list of fields to return. Include "score" to keep {memory, score} envelope; omit "score" for flat list of memory dicts. follow: Lineage mode — "latest" resolves each result to its current version, "active" excludes superseded memories, "full_history" expands supersession chains.
Returns: Dictionary with count and list of results, each containing score and memory
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| query | Yes | ||
| semantic_weight | No | ||
| top_k | No | ||
| min_score | No | ||
| metadata_filters | No | ||
| date_from | No | ||
| date_to | No | ||
| tags_any | No | ||
| tags_all | No | ||
| tags_none | No | ||
| content_mode | No | preview | |
| preview_chars | No | ||
| fields | No | ||
| follow | No |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| result | Yes |