Picture a memory system that, on purpose, hands your AI companion the exact opposite of what it expects to see. That’s the build one AI professional just dropped in r/PromptEngineering, and it’s called True Recall. The creator, who posts as u/OkDare7845, built it to fix a problem every companion app has: memory that just agrees with itself forever.
What Shipped
Most retrieval systems work the same way. Your agent has a stack of past conversations, it turns your current message into an embedding, and it fetches whatever’s closest in vector space. Simple, reliable, and also the reason a lot of AI companions feel stuck on repeat. If the last twenty exchanges were all cheerful, the system keeps fetching cheerful memories, and the character never really moves.
True Recall uses Qwen’s 8B embedding model with “Matryoshka” training, then truncates the output down to 512 dimensions. That part alone isn’t new. Plenty of retrieval-augmented setups truncate embeddings for speed, since Matryoshka training packs the strongest signal into the earlier dimensions on purpose. The interesting move happens after that, in how each of those 512 dimensions gets treated on its own instead of as one flat vector.
The Twist
For every single dimension, the system checks the variance across recent episodes. Then it runs that variance through a sigmoid, which makes the outcome close to binary: a dimension is either kept normal or “reflected” around zero. Low-variance dimensions, meaning the agent’s recent experience has leaned one way for a while, get flipped. High-variance dimensions, the ones already showing a healthy mix, stay untouched so the retrieval doesn’t drift off-topic.
The effect is a memory system with a built-in escape hatch. When one part of the agent’s recent pattern goes flat, the reflected dimensions start pulling in memories that push back against it. Meanwhile the rest of the retrieval stays anchored to the current scene, so nothing feels random or bolted on. One commenter, u/deranged_digger, summed it up better than any spec sheet could. It’s “a built-in contrarian signal that only kicks in when the agent’s been stuck in a rut.”
That’s the real unlock here. The memory doesn’t just answer “what’s relevant,” it also answers “what’s missing.” And it only speaks up when the pattern actually needs the push, which is what keeps it from feeling like noise.
Compare that to a standard RAG-style memory layer bolted onto a chatbot. Those systems have one job: find the nearest neighbor and hand it over. They’re great at staying on-topic and terrible at ever surprising you, because nearest-neighbor search has no concept of “you’ve seen enough of this already.” True Recall’s variance gate is a cheap way to bake that concept in without training a separate model to detect it.
Try the Workflow Yourself
- 🗨️ Talk to the companion across a handful of sessions, enough to build up an episode history worth measuring.
- 📉 Let a theme run flat on purpose. Keep the topic or tone narrow for a stretch instead of switching things up yourself.
- 🔀 Watch what gets retrieved next. Reflected dimensions should start surfacing memories that contrast with the recent run.
- 🧩 Compare that against a plain top-k retrieval in any other companion app you use, side by side.
Pro Tips
- The 512-dimension truncation matters more than it looks. Matryoshka training front-loads the signal, so cutting there keeps quality while cutting compute.
- If you’re rolling your own agent memory, per-dimension variance is cheap to log. You don’t need an LLM judge scoring every retrieval to get a contrast signal like this.
- Read the technical writeup before you try to replicate it. The homeostatic framing, treating memory retrieval like a system correcting toward balance, is the part worth stealing even if you skip the exact math.
Worth noting: this is a single-author, early-stage project, so treat it as a working prototype rather than a polished product. The creator didn’t flag major limitations in the post itself, but the sigmoid gating only runs per-dimension on the embedding side. It doesn’t touch how the agent reasons over what it retrieves. The quality of the final response still depends on the model doing the writing.
True Recall is free to use right now, no email required to try it. That makes it an easy one to just go poke at instead of taking someone’s word for it. If the variance-gating idea sticks with you, the original poster’s writeup breaks down the sigmoid reflection math in a lot more detail. It’s posted on Hugging Face’s forum. Go find the thread, read the full breakdown, and see if your own agent’s memory has been quietly agreeing with itself this whole time. 🚀
Built a companion app with associative memory using Matryoshka embeddings + dimension-wise reflection
by u/OkDare7845 in PromptEngineering