Skip to content

research: episodic-to-semantic memory promotion for long-term knowledge retention #1608

@bug-ops

Description

@bug-ops

Research Finding

Source: arxiv:2501.11739 (Jan 2025), arxiv:2512.13564
Applicability: High | Complexity: Moderate

Problem

Zeph stores all memory entries uniformly with no distinction between ephemeral episodic events and stable semantic facts. Over time, the memory grows unbounded and retrieval precision degrades as similar-but-stale entries compete with current ones. Ebbinghaus eviction handles decay but has no promotion complement.

Proposed Approach

A background consolidation job (similar to the existing autosave/snapshot loop) that:

  1. Clusters recent embeddings weekly using cosine similarity threshold (e.g. 0.92)
  2. Promotes stable clusters to a semantic_memory tier in SQLite by stripping episodic metadata (timestamp, session_id) and merging near-duplicate entries via LLM
  3. Soft-deletes episodic originals after promotion (preserving searchability with decay boost)

The promotion signal: a fact appears in N+ sessions without contradiction → stable semantic knowledge.

Memory Tier Design

Tier Table Retention Retrieval weight
Episodic messages decays (Ebbinghaus) temporal boost
Working summaries session-scoped context priority
Semantic semantic_facts (new) permanent high weight

Integration Points

  • crates/zeph-memory: new promote_to_semantic() background job
  • [memory.semantic] config: promotion_threshold (min sessions), similarity_threshold
  • CLI: /memory promote to trigger manual promotion
  • TUI: semantic fact count in memory panel

Reference

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or requestmemoryzeph-memory crate (SQLite)researchResearch-driven improvement

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions