You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This garbage dilutes every search, wastes embedding compute, and pollutes retrieval quality. Cleaning the pipeline is higher ROI than fancier retrieval math.
Implementation
1. Import Denylist + Cleanup
Skip at ingest: HEARTBEAT_OK, NO_REPLY, pure metadata JSON wrappers
Pattern-based denylist in config (extensible)
cortex cleanup --apply to purge existing garbage from live DB
Dry-run by default showing what would be removed
2. Smarter Garbage Collection
Memories with no linked facts + no access in 30 days → auto-retire
Low-confidence facts (<0.3) with no reinforcement in 14 days → auto-retire
cortex gc command for manual trigger + --aggressive flag
Configurable thresholds
3. Transcript Dedup
Content hash on import — reject exact duplicates
Near-duplicate detection: same content from different sources (memory file + transcript + agent session)
Keep the richest version (most metadata), retire duplicates
cortex dedup --dry-run for existing DB
4. Quality Gate at Import
Score incoming content: ratio of actual content vs metadata/JSON noise
If >70% is metadata wrapper, strip the metadata before storing
If remaining content <20 chars after stripping, skip entirely
Log skipped entries for audit
5. Size-Aware Lifecycle
When DB exceeds configurable threshold (e.g., 20K memories), tighten lifecycle
Auto-increase decay rates on low-access memories
Surface "DB health" metric: useful% vs noise%
cortex health should report noise ratio
Effort
M-L (1-2 weeks for full implementation)
Priority
HIGH — this improves every search query immediately
Activity