Skip to content

Implement hybrid retriever (vector + keyword merge) #373

@bug-ops

Description

@bug-ops

Epic: #364

Description

Combine Qdrant vector search with SQLite FTS5 keyword search using weighted score merge.

Design

[memory.hybrid_search]
enabled = true
vector_weight = 0.7
keyword_weight = 0.3

Tasks

  • HybridRetriever struct wrapping SemanticMemory + FTS5
  • recall() runs both searches concurrently via tokio::try_join!
  • Weighted merge: final_score = vector_weight * v_score + keyword_weight * k_score
  • Deduplicate by message_id, keep highest score
  • Config section [memory.hybrid_search] with weights
  • Benchmark: hybrid vs vector-only recall quality

Metadata

Metadata

Assignees

No one assigned

    Labels

    M19Milestone 19: Hybrid memory searchmemoryPersistence and memorypriority/highHigh prioritysize/M

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions