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 and Infographic
An architectural decision made 18 months ago is not less valuable because it's 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. A composite score that accounts for recency, retrieval frequency, and uniqueness prunes what is actually dead weight (old, never retrieved, duplicative) while preserving what has lasting value.
Full explanation below image
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.
Option A (delete entries older than 90 days) uses age as a proxy for relevance. This 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.
Option B is correct because it uses a composite retention score with three orthogonal signals: (1) Recency — recently accessed entries are likely still relevant; entries that have not been retrieved recently may have lower immediate value. (2) Retrieval frequency — entries that are retrieved often across many sessions are clearly providing value; entries never retrieved since creation may be duplicative or irrelevant. (3) Semantic uniqueness — if an entry is semantically similar to many other entries, it may be redundant; 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.
Option C (prune oldest 20% 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.
Option D (never prune, scale horizontally) ignores the compounding query cost of a large vector store. Retrieval quality degrades as the store grows because irrelevant entries increase retrieval noise (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.