-
Notifications
You must be signed in to change notification settings - Fork 0
Add Hybrid Search: Combine Vector similarity with keyword/tag matching #52
Copy link
Copy link
Open
Labels
0.1.xIssues for the 0.1 releaseIssues for the 0.1 releaseenhancementNew feature or requestNew feature or request
Description
Problem
Currently, the only search mechanism available is vector-based semantic search using the content of memory notes stored in LadybugDB. While this works well for semantic similarity, it has limitations:
- Exact keyword matches may be missed if the semantic meaning differs
- Tags and keywords stored on notes are not utilized for search ranking
- Results may miss relevant notes that contain specific terms the user is looking for
Proposed Solution
Implement a hybrid search approach that combines:
- Vector search (semantic similarity via embeddings)
- Keyword/tag fuzzy search (text matching on
keywords[]andtags[]arrays)
Score Fusion Algorithm
Use weighted score combination:
finalScore = (vectorScore * vectorWeight) + (keywordScore * keywordWeight)
Default weights: vectorWeight = 0.7, keywordWeight = 0.3
Matching Strategy
Use contains match (case-insensitive partial matching) via Cypher CONTAINS operator:
keywordsarray: match if any element contains the search termtagsarray: match if any element contains the search term
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
0.1.xIssues for the 0.1 releaseIssues for the 0.1 releaseenhancementNew feature or requestNew feature or request