Extraction: system+user split with explicit SAVE/DON'T SAVE rules,
few-shot examples, stricter JSON-only format. Min fact length 15 chars.
System prompt: model now knows about its 3-level memory, how to use
recalled facts, and that user can control memory via chat commands.
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Before inserting, check if a near-identical memory exists (cosine > 0.85).
If found, skip insert. Prevents flooding the DB with repeated facts
from the same conversation.
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>