fix(api): default direct-content memory_type to Insight, not Pinned#19
Merged
Conversation
Closes ourmem#13. POST /v1/memories with direct content (no memory_type) defaulted to MemoryType::Pinned. Pinned applies a 1.5x pinned_boost in rrf_fusion, so a Pinned default makes the boost apply uniformly across the whole corpus — defeating its purpose. Bulk-created memories all land pinned and the boost becomes a no-op for relative ranking. Flip the default to Insight (the normal, unboosted variant). Pinning is now an explicit opt-in via memory_type=pinned for curated high-signal memories. BEHAVIOR CHANGE: memories created via direct content without an explicit memory_type will no longer receive the pinned ranking boost. Existing data is untouched; callers wanting pinning pass memory_type=pinned. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
test_create_memory_with_type now expects the no-type default to be insight; test_update_memory_type creates an explicitly-pinned memory so the pinned->insight update path is still exercised. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Contributor
|
Merged and deployed — one-line fix, big semantic improvement. Closes #13. 👍 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Closes #13.
POST /v1/memories with direct content (no memory_type) defaulted to MemoryType::Pinned. Pinned applies a 1.5x pinned_boost in rrf_fusion, so a Pinned default makes the boost apply uniformly across the whole corpus — defeating its purpose. Bulk-created memories all land pinned and the boost becomes a no-op for relative ranking.
Flip the default to Insight (the normal, unboosted variant). Pinning is now an explicit opt-in via memory_type=pinned for curated high-signal memories.
BEHAVIOR CHANGE: memories created via direct content without an explicit memory_type will no longer receive the pinned ranking boost. Existing data is untouched; callers wanting pinning pass memory_type=pinned.