A long-running agent has accumulated 18 months of memory entries in its external vector store. The store is becoming expensive to query and store. The team needs to implement a pruning policy. Which pruning strategy MOST appropriately balances cost with retention of valuable memory?
Select an answer to reveal the explanation.
Short Explanation
You should not throw away an architectural decision just because it is 18 months old — it may be the most important thing in the store. Age-based pruning is like cleaning your house by throwing away everything in the oldest boxes without looking inside. Use a composite score that accounts for recency, retrieval frequency, and uniqueness so you prune what is actually dead weight while preserving what has lasting value.
Full Explanation
Memory pruning must distinguish between 'not recently used' and 'not valuable.' These are different properties, and conflating them leads to loss of critical organizational knowledge.
The strategy that deletes all memory entries older than 90 days uses age as a proxy for relevance. That is wrong for knowledge that has a long shelf life. An architectural decision to use PostgreSQL instead of MongoDB, made 18 months ago, is still highly relevant context. An incident postmortem from 14 months ago explaining why a particular pattern was abandoned is still valuable. Age alone is a poor signal for retention decisions.
The composite retention score strategy is correct because it uses a composite retention score with three orthogonal signals: recency, retrieval frequency, and semantic uniqueness. Recency matters because recently accessed entries are likely still relevant, while entries that have not been retrieved recently may have lower immediate value. Retrieval frequency matters because entries that are retrieved often across many sessions are clearly providing value, while entries never retrieved since creation may be duplicative or irrelevant. Semantic uniqueness matters because if an entry is semantically similar to many other entries, it may be redundant, while unique entries covering rare topics have higher retention value even if seldom retrieved. Crucially, certain categories — architectural decisions, incident postmortems, standing policies — are always retained regardless of score because their value is long-term and periodic, not measured by retrieval frequency. These are the 'never prune' exceptions to the scoring rule.
The strategy that prunes the oldest 20% of entries monthly is better than pure age-based pruning only if age is correlated with value, which it is not for knowledge stores. It also creates predictable data loss rather than value-preserving pruning.
The strategy that never prunes memory and instead scales the vector store horizontally ignores the compounding query cost of a large vector store. Retrieval quality degrades as the store grows because irrelevant entries increase retrieval noise, and semantic search returns more false positives. Cost scales with store size for both storage and query. Horizontal scaling is appropriate for high-traffic operational data, not for long-term knowledge stores where curation has intrinsic value.