Skip to content

[pull] main from supermemoryai:main#239

Merged
pull[bot] merged 1 commit intocode:mainfrom
supermemoryai:main
Mar 9, 2026
Merged

[pull] main from supermemoryai:main#239
pull[bot] merged 1 commit intocode:mainfrom
supermemoryai:main

Conversation

@pull
Copy link

@pull pull bot commented Mar 9, 2026

See Commits and Changes for more details.


Created by pull[bot] (v2.0.0-alpha.4)

Can you help keep this open source service alive? 💖 Please sponsor : )

### TL;DR

Enhanced the `forgetMemory` method to try exact content matching first, then fall back to semantic search with a high similarity threshold for more precise memory deletion.

### What changed?

The `forgetMemory` method now uses a two-step approach: first attempting exact content matching via the API, and if that fails with a 404, falling back to semantic search with a similarity threshold of 0.85. The search method also accepts an optional threshold parameter. Error messages now distinguish between exact matches and semantic matches, including similarity scores in the response.

### How to test?

1. Call `forgetMemory` with the exact content of an existing memory to verify direct deletion
2. Call `forgetMemory` with similar but not identical content to test the semantic search fallback
3. Call `forgetMemory` with completely unrelated content to verify the "no matching memory found" response
4. Verify that success messages indicate whether deletion used exact matching or semantic matching with similarity scores

### Why make this change?

This approach provides more precise memory deletion by prioritizing exact matches while still offering a fallback for similar content. The high similarity threshold (0.85) ensures that only very similar memories are deleted when exact matches aren't found, reducing the risk of accidentally deleting unrelated memories.
@pull pull bot locked and limited conversation to collaborators Mar 9, 2026
@pull pull bot added the ⤵️ pull label Mar 9, 2026
@pull pull bot merged commit 07875ad into code:main Mar 9, 2026
1 check failed
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant