{"slug": "my-ai-memory-layer-kept-the-old-fact-the-fix-worked-and-i-still-did-not-ship-it", "title": "My AI memory layer kept the old fact. The fix worked, and I still did not ship it as the default.", "summary": "A developer behind the open-source Memory Assistant project measured how often an AI memory layer surfaces an updated fact before the outdated one, finding the new value ranked first in only 0.471 of 70 LongMemEval-S knowledge-update questions. A pre-committed recency re-ranking fix (sorting the top 20 results by position minus three times freshness) raised that to 0.729 but dropped the developer's own eval sets from 23/24 to 16/24, so it ships off by default behind a RECENCY=1 flag in release v0.4.0, which also adds per-user access keys and marks the project as entering maintenance mode.", "body_md": "In my [first post](https://dev.to/ravi07/i-measured-my-ai-memory-layer-on-two-public-benchmarks-here-is-what-moved-the-numbers-3gk)\n\nI listed what I had not measured. One item bothered me: what happens when a fact changes.\n\n**Memory Assistant** replaces a fact in place when it has a key (\"lives in\" Pune, then \"lives in\" Delhi). But most facts\n\nhave no key. \"My 5K personal best is 27:12\", and weeks later \"25:50\": the store keeps both, and search ranks them by\n\nhow well they match the question. Nothing says the second one is newer.\n\nLongMemEval-S has knowledge-update questions: the user said something twice with a different value, and the question\n\nasks for the current one. The dataset marks both turns as evidence, and every session has a date, so I could split\n\nthe evidence into **new** and **old** and ask a question the usual recall metrics cannot: which one comes first?\n\n70 questions could be scored this way. With my default (hybrid search), **the new value came first in only 0.471 of them.** More than half the time, a model reading the results would see the outdated value first.\n\nI have made this mistake before: try a fix, see a good number, call it the default. So before writing any code I\n\ncommitted a rule. The method: re-order only the top 20 results, and let a newer memory move up at most 3 places\n\n(sort by `position - 3 * freshness`). Two parameters, fixed in advance, no tuning. It becomes the default only if:\n\n| Condition | Before | After |  | \n|---|---|---|---|\n| New value first (70 questions) | 0.471 | **0.729** | met | \n| Old value alone in the top 5 | 0.057 | 0.057 | met | \n| Worst drop on another LongMemEval-S type |  | 0.016 | met | \n| LoCoMo recall@5 | 0.561 | 0.558 | met | \n| Own eval sets | 26/27, 23/24 | **24/27, 16/24** | **failed** | \n\nThree out of four, and a big win on the thing I set out to fix. And my own test set fell from 23/24 to 16/24.\n\nThe reason is simple once you see it. In my own cases, all the facts arrive in one message (\"I live in Jaipur. I\n\nwork as an accountant. I like cricket...\"), so they are written microseconds apart. \"Newer\" then just means \"later in\n\nthe sentence\", and recency promotes whichever fact came last. The same thing costs LoCoMo recall@1 (0.285 to 0.247),\n\nbecause turns in one session are seconds apart.\n\nSo, as the rule says, it ships **off by default** (`RECENCY=1` turns it on), and the README shows both sides.\n\nThis release also added per-user access keys (a user's key gets 403 for anyone else) and Dependabot. It is the last\n\nfeature release; the project is in maintenance mode now.\n\nCode, the rule as committed before the run, and every raw result:\n\n**[https://github.com/munendra07-tech/memory-assistant](https://github.com/munendra07-tech/memory-assistant)** (release v0.4.0)", "url": "https://wpnews.pro/news/my-ai-memory-layer-kept-the-old-fact-the-fix-worked-and-i-still-did-not-ship-it", "canonical_source": "https://dev.to/ravi07/my-ai-memory-layer-kept-the-old-fact-the-fix-worked-and-i-still-did-not-ship-it-as-the-default-39f6", "published_at": "2026-12-06 20:37:13+00:00", "updated_at": "2026-12-06 20:44:35.002185+00:00", "lang": "en", "topics": ["ai-agents", "ai-tools", "artificial-intelligence"], "entities": ["Memory Assistant", "LongMemEval-S", "LoCoMo", "GitHub"], "also_reported_by": [], "takeaway": "Recency-based re-ranking lifted new-value-first ordering from 0.471 to 0.729 on 70 LongMemEval-S knowledge-update questions but cut the developer's own eval sets from 23/24 to 16/24 because same-message facts arrive microseconds apart, so it ships off by default.", "recommendation": {"advice": "Test recency re-ranking against your own eval sets before enabling it, since facts written in the same message get promoted by position rather than true freshness.", "playbook": "rag-retrieval", "playbook_url": "https://wpnews.pro/playbooks/rag-retrieval"}, "alternates": {"html": "https://wpnews.pro/news/my-ai-memory-layer-kept-the-old-fact-the-fix-worked-and-i-still-did-not-ship-it", "markdown": "https://wpnews.pro/news/my-ai-memory-layer-kept-the-old-fact-the-fix-worked-and-i-still-did-not-ship-it.md", "text": "https://wpnews.pro/news/my-ai-memory-layer-kept-the-old-fact-the-fix-worked-and-i-still-did-not-ship-it.txt", "jsonld": "https://wpnews.pro/news/my-ai-memory-layer-kept-the-old-fact-the-fix-worked-and-i-still-did-not-ship-it.jsonld"}}