Repository navigation
Serve only relevant memories, in a small packet - #19
Merged
Merged
Conversation
- retrieve.search: drop the standing fill (nothing relevant, nothing served); optional context scored like a second question (element-wise maximum, relevance hook unchanged); optional scope (that scope and "global" only); Result.more counts relevant memories cut by the limit. - read_memories / personakit_read: evidence only with include_evidence; a memory already sent by this server process comes back as its id only unless include_seen (or include_evidence); "more" in the response; assistant-facing docstring rewritten. - Memory.answers and Memory.applies_when: owner-written hints, stored as JSON lists (new migration, existing stores keep their data), counted by word overlap, never served. New `personakit hints` command. - README, ARCHITECTURE, PRIVACY and PLUGINS describe the new behaviour. Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_014dGcvUc3LqzKojYnqVGCjK
Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_014dGcvUc3LqzKojYnqVGCjK
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.
Requested by Yanir · project thread
What changed
The read an assistant makes returns less, and only what relates to the question. This comes after 0.2.0 and is not part of that release.
retrieve.searchno longer adds up to three approved memories when fewer match. Nothing relevant gives an empty answer.personakit_readsends the quotes only withinclude_evidence.{"id", "seen": true}unlessinclude_seen(orinclude_evidence, since the quotes would be new). Aseen_notetells the assistant how to ask again.contextandscopeon reads.contextis what the assistant is about to do; it is scored like a second question and a memory keeps the better score, so theRelevancehook signature is unchanged.scopelimits candidates to that scope plusglobal.morein the answer counts relevant, servable memories the limit left out.Memory.answersandMemory.applies_when, set withpersonakit hints <id>. They count in the built-in word overlap and are never sent to assistants. Store migration 5 adds the two columns; existing stores upgrade in place.personakit_readdescription tells the assistant to ask one focused question before acting.Why
Every read used to return material the question did not ask for: three approved memories when nothing matched, two quotes per memory, and the same memory again on each later read. The owner asked that assistants receive only what is relevant to what they are doing.
How to verify
tests/test_store.pyopens a database built with migrations 1 to 4 plus data and checks nothing is lost.Known limits
scopechanges nothing today: nothing in the package writes a scope other thanglobal.include_seenif it no longer has the text (for example after its context was shortened).contextmatches many memories on common words. The limit caps the size, not the quality.mcppackage is 2.x; they pass withmcp<2.Checklist
git commit -s), see CONTRIBUTING.md. Not signed off: the commits were written by Claude for the repository owner, whom the DCO check exempts.docs/ARCHITECTURE.mdGenerated by Claude Code