Skip to content

feat: Add inline memory item references in category summaries (#202)#205

Merged
evan-ak merged 6 commits intoNevaMind-AI:mainfrom
Nsuccess:feature/issue-202-memory-item-refs
Feb 4, 2026
Merged

feat: Add inline memory item references in category summaries (#202)#205
evan-ak merged 6 commits intoNevaMind-AI:mainfrom
Nsuccess:feature/issue-202-memory-item-refs

Conversation

@Nsuccess
Copy link
Contributor

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:

  1. No traceability - Users cannot verify which memory items support specific claims in category summaries
  2. Retrieval gaps - When category summaries don't contain enough detail, there's no efficient way to drill down to the relevant source items

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.

# Before: category_updates = {"cat_id": ["summary1", "summary2"]}
# After:  category_updates = {"cat_id": [("item_abc", "summary1"), ("item_def", "summary2")]}
@Nsuccess Nsuccess force-pushed the feature/issue-202-memory-item-refs branch from fadc1fa to 0991e19 Compare January 13, 2026 14:46
@Nsuccess Nsuccess force-pushed the feature/issue-202-memory-item-refs branch from f2cb96f to 67b9e7a Compare January 16, 2026 12:51
@evan-ak
Copy link
Collaborator

evan-ak commented Jan 20, 2026

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!

@evan-ak evan-ak merged commit 5213571 into NevaMind-AI:main Feb 4, 2026
1 check passed
@hussainiusmanabubakar30-code

You

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

3 participants