I built my own mini
@hydra_db
Spent the last few weeks rebuilding an AI memory system from scratch, this time based on the Hydra DB paper.
My last attempt was Mem0-style: extract facts, embed them, UPDATE or DELETE on contradiction. It worked. But every UPDATE silently destroyed history. Every DELETE pretended a fact never existed. I was building a faster log file, not a memory.
HydraDB takes a different stance:
- Never delete. Never update. Append-only forever.
- Three vectors per memory (literal, semantically-enriched, BM25 sparse); search hits whichever lane fits the query.
- Forgetting isn't eviction. Memories decay through a bio-mimetic curve (Ebbinghaus reinforcement) and the LLM reasons about freshness at retrieval time. The paper uses rerankers, I went with LLM reasoning for v1.
How the decay actually works, in plain terms:
Every memory has a retention score. Two forces push on it:
- Decay: each memory has a birth time (t_commit). The longer it sits untouched, the more its score drops on an exponential curve. With my settings, the baseline roughly halves every two weeks.
- Reinforcement: every time a memory is actually used to answer a question, a record-access worker appends a timestamp to it. Recent accesses bump the score back up; older accesses contribute less and less.
A retention worker runs once a day, sweeps every memory, recomputes the score, and maps it to a tier: Hot, Warm, Cold, or Stale. Nothing ever gets deleted. The answer LLM just reads the tier and frames old facts historically ("you previously mentioned…") instead of treating them as current truth.
The most interesting moment was catching a live bug I'm calling "reinforcement grooming"; stale memories that got queried often inflated their retention score and started beating fresher facts in answers.
Fixed it with a precedence ladder in the answer prompt (supersession verbs > t_valid > t_commit > retention as tie-breaker only) and citation-gated reinforcement, only memories the LLM actually cited get reinforced, not everything that surfaced.
I've been knee-deep in AI memory for almost a year now and it's still the subfield I find most beautiful. Mem0 reasons from first principles. MemoryBank borrows from cognitive science. Hydra DB starts from the database side.
Three completely different starting points and they converge on the same primitives: chunked embeddings, structured fact extraction, temporal metadata, decay, reinforcement.
If you've made it this far, thank you. There aren't a lot of people who love memory architecture the way I do, and writing these posts is partly how I find them.
See you in the next one.
site link:
lnkd.in/eVBRWsqa
blog:
lnkd.in/eAgQkxdp
please checkout the demo below
@contextkingceo