Summary
Use text-overlap detection and polarity checking before invoking the LLM for consolidation. Reduces cost and latency for simple cases.
Design
- Before LLM summarization, run heuristic checks:
- Text overlap >35% between memories → merge candidate (concat without LLM)
- Polarity mismatch detection (enabled/disabled, true/false, before/after) → flag contradiction
- Exact duplicate detection → skip
- Only invoke LLM for complex batches that need semantic understanding
- Track LLM cost savings from heuristic bypass
Inspiration
Inspired by hippo-memory (MIT) 35% overlap merge threshold and claude-code-toolkit (MIT) deterministic-vs-probabilistic philosophy.
Closes #53
Summary
Use text-overlap detection and polarity checking before invoking the LLM for consolidation. Reduces cost and latency for simple cases.
Design
Inspiration
Inspired by hippo-memory (MIT) 35% overlap merge threshold and claude-code-toolkit (MIT) deterministic-vs-probabilistic philosophy.
Closes #53