Less Context, More Accuracy: A Bi-Temporal Memory Engine for LLM Agents Where a Lean Retrieved Context Beats the Full History
The paper introduces Engram, an open-source bi-temporal memory engine that outperforms full-context baselines in accuracy and efficiency by combining a lossless write path with a hybrid read strategy that assembles compact, provenance-tagged context from a bi-temporal knowledge graph, achieving an 83.6% score on LongMemEval_S while using significantly fewer tokens.
Original paper licensed under CC BY 4.0 (http://creativecommons.org/licenses/by/4.0/). This is an AI-generated explanation of the paper below. It is not written or endorsed by the authors. For technical accuracy, refer to the original paper. Read full disclaimer
The Big Problem: The "Overloaded Backpack"
Imagine you are trying to solve a mystery, but your detective partner (the AI) has a backpack that gets heavier every time you talk.
- The Old Way: To remember a clue from three days ago, you dump the entire backpack onto the table. It's full of everything: the weather report from Tuesday, the menu from a restaurant you visited last week, and the actual clue you need.
- The Result: The detective gets overwhelmed by all the junk (distractors). They spend so much time sifting through the trash that they miss the clue, or they get confused by the noise. Also, carrying that heavy backpack is slow and expensive.
The Solution: Engram (The "Smart Librarian")
The authors built a new system called Engram. Instead of dumping the whole backpack, Engram acts like a super-smart librarian who keeps a perfect, organized archive. When you ask a question, the librarian doesn't bring you the whole library; they bring you only the specific pages you need, plus a clear note on when those pages were written.
Here is how it works, broken down into three simple parts:
1. The Two-Step Writing Process (System-1 & System-2)
Engram writes memories in two different ways, like a human brain:
- The Fast Write (System-1): When you chat, Engram instantly saves a raw, lossless copy of the conversation (like a security camera recording). This happens in milliseconds and doesn't slow you down.
- The Slow Think (System-2): Later, when the system is idle, it reads that recording and turns it into atomic facts (simple statements like "X works at Y"). It builds a timeline of these facts.
- The Magic Trick: If a fact changes (e.g., "X works at Y" becomes "X works at Z"), Engram doesn't delete the old one. It marks the old one as "expired" and links the new one to it. This creates a "supersession chain." You can always look back and see: "Oh, at 2:00 PM, we thought X worked at Y, but at 3:00 PM, we updated it to Z."
2. The "As-Of" Filter (Time Travel)
Because Engram keeps a timeline of when facts were true, it can answer questions based on when you are asking.
- Analogy: If you ask, "Where did X work?" Engram knows to check the timeline. If you are asking about last month, it shows the old job. If you are asking about today, it shows the new job. It doesn't get confused by contradictions because it knows exactly when each version was valid.
3. The Hybrid Read (The Best of Both Worlds)
When you ask a question, Engram doesn't just guess. It uses a "hybrid" search:
- It looks for the facts (the clean, organized notes).
- It also grabs the raw chunks (the original conversation snippets) to make sure it doesn't lose small details.
- It mixes these together, filters out the junk, and hands the detective a tiny, perfect stack of papers (about 9,600 words) instead of the whole library (79,000 words).
The Results: Less is More
The authors tested this on a 500-question exam called LongMemEvalS.
- The Full-Context Team: Tried to answer by reading the entire history every time. They got 73.2% correct.
- The Engram Team: Answered using only the tiny, filtered stack of relevant papers. They got 83.6% correct.
The Surprise: By throwing away 87% of the text (the distractions), Engram actually became more accurate. The noise in the full history was actually hurting the AI's performance.
Why This Matters (According to the Paper)
- Accuracy over Cost: Usually, people try to save money by using less memory. Engram proves that using less memory can actually make the AI smarter because it stops the AI from getting distracted.
- No "Fake" Numbers: The authors are very strict about honesty. They built a public, reproducible testing tool (a "harness") so anyone can run the test and see the same results. They fixed common bugs where other researchers accidentally gave themselves an unfair advantage (like letting the AI see the answer in the full history).
- Privacy & Control: Because the system keeps a clear trail of "what was believed and when," it's easier to delete specific memories if a user asks to be forgotten. It also runs locally, meaning your data doesn't have to leave your computer.
The Bottom Line
Engram shows that for AI agents, quality of memory matters more than quantity. Instead of forcing the AI to read its entire life story to answer a simple question, a smart, time-aware system that retrieves only the relevant, verified facts can solve problems faster, cheaper, and more accurately.
Drowning in papers in your field?
Get daily digests of the most novel papers matching your research keywords — with technical summaries, in your language.