memory_hybrid_search
Merge keyword and vector search results with reciprocal rank fusion, retrieving more accurate memories than either method alone. Narrow results using tags, dates, filters, and adjustable semantic weight.
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 (legacy name; default 10 if neither limit nor top_k)
limit: Alias for top_k — preferred name; honored so callers matching memory_list work
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. Default active (excludes superseded memories).
latest / full_history as documented on memory_list;
all is the explicit unfiltered forensic escape hatch.
Omitting follow is NOT unfiltered — it means the safe default.
Returns: Dictionary with count and list of results, each containing score and memory
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| limit | No | ||
| query | Yes | ||
| top_k | No | ||
| fields | No | ||
| follow | No | ||
| date_to | No | ||
| tags_all | No | ||
| tags_any | No | ||
| date_from | No | ||
| min_score | No | ||
| tags_none | No | ||
| content_mode | No | preview | |
| preview_chars | No | ||
| semantic_weight | No | ||
| metadata_filters | No |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| result | Yes |