|
Improve memory search: normalize query, AND-first, relevance scoring
- _normalize_query(): hyphens/underscores/slashes/dots → word boundaries, strip all other punctuation, lowercase — fixes comma-separated keyword bug - Auto-dump: if ≤ 60 facts in DB, skip search and return all (no false negatives in a small personal memory store) - AND-first: try matching all terms; fall back to OR only when AND returns nothing - OR-fallback with scoring: facts matching more terms rank higher (score DESC), ties broken by recency Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com> |
|---|
|
|
| navi/memory/store.py |
|---|