Show HN: Tried some experiments with architecture for Long term memory for LLM

Faisal98761 pts0 comments

The main ideas that survived the experimentation are:using four memory types — user, knowledge, episodic, and decision memories, each with different lifecycles, different roles and different token budget in the retrieved context. Decision analysis + anchors — decisions can evolve overtime so they can be active or superseded or conditional instead of remaining as unrelated memories. we keep the track of decision memory which is active, superseded or conditional with additional context and using such active decisions related to the query as anchors to further retrieve memories using lexical bm25 often helps. Smart injection — New memories aren t simply assigned to a topic based on similarity. An LLM-guided ingestion step uses the existing topic structure as context to decide where a memory belongs and how it relates to what is already there. This lets the hierarchy grow dynamically instead of becoming a collection of isolated memory nodes.Hierarchical summaries — MindCache adapts the static RAPTOR-style tree idea into a dynamic hierarchy that is incrementally updated as new memories arrive. Organizing memories into broader topics and maintaining summaries at those levels helps with broad queries, where retrieving individual memories one by one may miss the overall context. The topic structure also gives retrieval additional lexical/contextual signals, so a query can match against the organized topic structure as well as the underlying memories. On my BEAM evaluation, MindCache achieved about 64% average rubric pass rate vs ~53% for Mem0, with stronger results on several categories including summarization, contradiction resolution, and multi-session reasoning. It s now released as a Python SDK and has an MCP server for connecting it to MCP-compatible clients. Check it out. Feedbacks are appreciated. I also wrote a short overview of the project if you are interested:https://medium.com/@faisaliitian/i-built-an-ai-memory-system...

memories memory context topic using decision

Related Articles