Skip to content

bug: --strategy flag silently ignored — all recalls use vector search (default path bypasses recall_hybrid) #900

Closed

Description

@ajianaz

What

--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.

Environment

  • Store: 5,908 memories, 5,912 FTS5 entries, 768d embeddings
  • Binary: uteke v0.13.0-dev
  • FTS5 table confirmed working via direct SQL: SELECT ... FROM memories_fts WHERE memories_fts MATCH 'database' returns 5 results; MATCH 'zzznonexistentxyz' returns 0

Activity

  1. added
    bug
    scope:core
    priority:critical
    on Aug 5, 2026
  2. added 3 commits that reference this issue on Aug 5, 2026
  3. added a commit that references this issue on Aug 13, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugpriority:criticalscope:core

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions