fix: filter archived/dormant memories from semantic_recall() (#3) #7
No reviewers
Labels
No Milestone
No project
No Assignees
1 Participants
Notifications
Due Date
No due date set.
Dependencies
No dependencies set.
Reference: cal/cognitive-memory#7
Loading…
Reference in New Issue
Block a user
No description provided.
Delete Branch "ai/cognitive-memory-3"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Summary
semantic_recall()inembeddings.pywas scoring all memories in_embeddings.jsonagainst the query vector with no decay filter, allowing archived/dormant memories (decay_score < 0.05) to surface via high semantic similarityTHRESHOLD_DORMANTguard used by the keyword path inrecall()— now consistent across both recall pathsWhat changed
embeddings.pyTHRESHOLD_DORMANTto imports fromcommonsemantic_recall(), load_state.jsonand skip any memory whosedecay_score < THRESHOLD_DORMANTbefore computing cosine similarity — avoids unnecessary computation for archived entriesFiles changed
embeddings.pyTest results
No test suite. Changes verified by code review — the filter logic mirrors the existing guard in
recall()exactly.