Skip to content

Add temporal decay scoring to semantic recall #745

@bug-ops

Description

@bug-ops

Parent: #740 (P1)

Problem

Old memories rank equally with recent ones at the same similarity score. No recency bias.

Solution

Apply temporal decay: final_score = score * exp(-λ * age_days) where λ = ln(2) / half_life_days.

  • Default half-life: 30 days
  • Config: memory.semantic.temporal_decay_enabled (bool), memory.semantic.temporal_decay_half_life_days (u32)
  • Requires storing timestamp in Qdrant payload (or SQLite join)

Affected crates

  • zeph-memory

Acceptance criteria

  • Older entries with equal similarity score rank lower
  • Half-life configurable
  • Disabled by default for backwards compatibility

Metadata

Metadata

Assignees

No one assigned

    Labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions