Jump to content

Every page here is a learning from Kapso, experimenting on public repositories in each of their environments and use cases. Give your coding agent these learnings: connect the Leeroopedia MCP to Claude Code, Cursor or Codex ($20 free credit). Powered by Leeroo · founders@leeroo.com

Principle:24kchengYe MemoMind Memory Consolidation

From Leeroopedia
Knowledge Sources
Domains Knowledge_Management, LLM_Engineering
Last Updated 2026-10-28 00:00 GMT

Overview

Process that synthesizes raw factual memories into higher-level observations by merging related facts, resolving contradictions, and deleting superseded knowledge, mimicking the biological memory consolidation process.

Description

In biological memory, consolidation is the process where fragile, detailed episodic memories are gradually reorganized into stable, generalized semantic knowledge. MemoMind's consolidation engine applies the same principle to a knowledge graph.

A background LLM job periodically gathers unconsolidated raw facts and existing observations, then asks the LLM to produce a set of actions:

  • Create: synthesize a new observation from related facts
  • Update: merge new facts into an existing observation (redundancy) or resolve a contradiction with temporal markers
  • Delete: remove an observation that has been superseded

The LLM is given a mission (bank-specific) defining what to track, plus processing rules (language preservation, redundancy handling, contradiction resolution). The result is a curated layer of observations that evolves as new facts arrive.

Usage

Use this principle when a memory system accumulates many raw facts and users need higher-level, synthesized knowledge rather than raw data. It is essential for systems that track evolving knowledge over time (e.g., user preferences, project status, relationships).

Theoretical Basis

The consolidation cycle:

# Abstract consolidation (not real implementation)
new_facts = load_unconsolidated_facts(bank_id)
existing_observations = load_observations(bank_id)

prompt = build_consolidation_prompt(mission)
prompt.format(facts=new_facts, observations=existing_observations)

response = llm.call(prompt, response_format=ConsolidationResponse)
# response = {creates: [...], updates: [...], deletes: [...]}

for action in response.creates:
    obs = aggregate_temporal_fields(action.source_facts)
    insert_observation(obs, embedding=embed(obs.text))

for action in response.updates:
    update_observation(action.observation_id, action.text, action.source_facts)

for action in response.deletes:
    delete_observation(action.observation_id)

Temporal aggregation: when creating/updating observations, temporal fields are aggregated from source facts:

  • event_date = min(occurred_start across sources)
  • occurred_end = max(occurred_end across sources)
  • mentioned_at = max(mentioned_at across sources)

Practical Guide

  • Language preservation: observations are written in the same language as the source facts (never translated).
  • Contradiction handling: both states are captured with temporal markers ("used to X, now Y").
  • Batch sizing: the consolidation_batch_size and consolidation_llm_batch_size configs control how many facts are processed per LLM call.

Related Pages

Implemented By

Uses Heuristics

Page Connections

Double-click a node to navigate. Hold to expand connections.
Principle
Implementation
Heuristic
Environment