feat: Add inline memory item references in category summaries (#202)#205
Merged
evan-ak merged 6 commits intoNevaMind-AI:mainfrom Feb 4, 2026
Merged
Conversation
fadc1fa to
0991e19
Compare
f2cb96f to
67b9e7a
Compare
Collaborator
|
Thank you very much for your contribution. We are actively working on merging this feature into MemU. The current implementation basically fulfills the requirements of #202, while we would like to continue with some further optimization on how these references are inspected and how they guide the retrieval process (especially the LLM-based one). As a result, we are making a few minor revisions to the current commits and will proceed with the merge once these adjustments are complete. Thanks again for the great work! |
|
You |
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.
Overview
This PR implements inline
[ref:ITEM_ID]citations in category summaries, creating traceable links between summarized statements and their source memory items. When category-level information is insufficient during retrieval, the system can now follow these references to fetch the specific memory items that support each statement.Closes #202
Problem Statement
Currently, category summaries in memU provide high-level aggregated information but lose the connection to the original memory items that contributed to each statement. This creates two issues:
Solution
1. Enhanced Memorization Workflow
Automatic Reference Integration:
When new memory items are persisted, the system now tracks
(item_id, summary)tuples instead of just summaries. This enables the category summary prompt to include item IDs that the LLM can reference.