Expand description
AOI three-layer memory tier promotion.
Provides a background sweep loop that promotes frequently-accessed episodic messages to the semantic tier by:
- Finding candidates with
session_count >= promotion_min_sessions. - Grouping near-duplicate candidates by cosine similarity (greedy nearest-neighbor).
- For each cluster with >= 2 messages, calling the LLM to distill a merged fact.
- Validating the merge output (non-empty, similarity >= 0.7 to at least one original).
- Inserting the semantic fact and soft-deleting the originals.
The sweep respects a CancellationToken for graceful shutdown, following the
same pattern as eviction.rs.
Structs§
- Tier
Promotion Config - Configuration for the tier promotion sweep, passed from
zeph-config::TierPromotionConfig.
Functions§
- start_
tier_ promotion_ loop - Start the background tier promotion loop.