You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
bug: --strategy flag silently ignored — all recalls use vector search (default path bypasses recall_hybrid) #900
--strategy fts5 and --strategy hybrid are silently ignored by the CLI recall command. All strategies return identical vector search results.
Reproduction
# All three return EXACT same IDs, scores, and ordering:
uteke recall "database optimization" --strategy vector --limit 5 --json
uteke recall "database optimization" --strategy fts5 --limit 5 --json
uteke recall "database optimization" --strategy hybrid --limit 5 --json
# FTS5 should return 0 for nonexistent word, but returns 5 vector results:
uteke recall "zzznonexistentxyz" --strategy fts5 --limit 5 --json
# Returns 5 results with cosine similarity scores (0.59, 0.56...) — impossible for FTS5
Root Cause
In crates/uteke-cli/src/commands/recall.rs (line 51-62), when SearchType::All (the default) is active and no memory-only flags (--at, --related, --entity, --category, --where) are set, use_unified = true.
The unified path calls recall_unified() → recall_unified_memories() → self.recall() (lib.rs line 1686), which always uses vector search. The resolved_strategy variable is never passed.
Even --type memory goes through recall_unified_memories() → recall(), bypassing strategy.
The only way to make --strategy work is to use one of: --at, --related, --entity, --category, or --where — which forces use_unified = false and routes to recall_hybrid() with the strategy parameter.
Impact
Users cannot use FTS5-only or hybrid search from CLI despite the flag being documented
Hybrid (RRF) and graph strategies are completely inaccessible on default path
Debug log shows zero FTS5 query execution — only usearch lock + ONNX init
Expected Behavior
--strategy should be respected on all recall paths, including unified search.
Proposed Fix
Pass resolved_strategy to recall_unified() → recall_unified_memories(), and have recall_unified_memories() call self.recall_hybrid() instead of self.recall() when strategy != Vector.
Alternatively, route all strategy-aware recalls through recall_hybrid() before the unified path check.
FTS5 table confirmed working via direct SQL: SELECT ... FROM memories_fts WHERE memories_fts MATCH 'database' returns 5 results; MATCH 'zzznonexistentxyz' returns 0
Activity
fix(#900): post-filter entity/category in recall_unified_memories
fix(#900): over-fetch to fill limit after entity/category post-filter
fix(#900): honour recall strategy flag in unified search path (#909)
fix(#900): honour recall strategy flag in unified search path (#909)