Conversation
Contributor
Author
|
Inspired by Ebbinghaus’ Forgetting Curve |
felixnorden
approved these changes
Jan 30, 2025
felixnorden
approved these changes
Jan 30, 2025
|
|
||
| ## SIP Format | ||
|
|
||
| # SIP-XXX: Title |
Contributor
There was a problem hiding this comment.
Suggested change
| # SIP-XXX: Title | |
| # SIP-XXXX: Title |
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.
SIP-0001: Evolving Memory Graph via
recall_countand Dynamic Edge WeightsStatus: In Review
Author: samsar
Acknowledgements: cwm felixnorden
1. Overview
Problem: Standard RAG setups rely purely on semantic similarity at query time, producing a static view of agent memory that doesn't adapt to real usage or user feedback.
Solution: Introduce:
recall_count– A field that tracks how often a memory is retrieved.connectionsentry becomes an object with aweightthat updates based on semantic overlap, co-occurrence, and user feedback (e.g., upvotes, confirmations, or direct edits).This turns Soulscript's memory structure into a living, usage-driven graph, where core memories naturally strengthen if they see frequent use or positive user feedback, and weaken if they remain idle or receive negative signals.
2. Proposed Changes
2.1
recall_countFieldType: Integer (≥ 0)
Definition: Tracks how many times a memory is retrieved or referenced during generation.
Novelty: Directly encodes usage frequency—helping the agent "reinforce" frequently recalled knowledge.
{ "id": "mem_01HKG9X5NJWT", "connections": [...], "importance_score": 0.85, "recall_count": 5 }2.2 Dynamic Edge Weights
connectionsis a simple list of IDs.memory_id: The linked memory's IDweight: Reflecting semantic similarity, co-occurrence, and user feedback signalsOptional fields like
last_updatedorco_occurrences{ "connections": [ { "memory_id": "mem_01HKG9X5MJKT", "weight": 0.8, "last_updated": 1703030400000 } ] }2.3 Approaches for Integrating
recall_countwithimportance_scoreThe relationship between
recall_countandimportance_scorecan be clarified through two possible approaches:importance_scoreas a Static-Plus-Dynamic Compositeimportance_scorerepresents a computed value that combines static significance (e.g., event priority) and dynamic usage (recall_count).recall_countdirectly influencesimportance_score, ensuring it evolves over time with agent usage.recall_countas a Separate Driver for ImportanceDefinition:
importance_scoreremains static, whilerecall_countprovides additional context for dynamically ranking memories during retrieval.How It Works: The system calculates a dynamic priority at query time by combining
importance_scoreandrecall_count:This keeps
importance_scorefixed while leveragingrecall_countfor retrieval adaptability.These approaches provide flexibility in integrating
recall_count, allowing developers to choose between dynamic recalibration ofimportance_scoreor treating it as a static baseline augmented by usage signals.3. How User Feedback Fits In
recall_countand the relevant connection'sweight.weightor drop the connection entirely.4. What This Solves
5. Implementation & RAG Integration
recall_counteach time a memory is selected by RAG or user queries.6. Conclusion
By adding
recall_countand dynamic, feedback-driven edge weights, Soulscript evolves from a static memory list to a robust, usage-sensitive knowledge graph. Agents not only pull semantically relevant chunks but also reinforce what's truly valuable, guided by real user feedback and a human-like process of memory reinforcement.