2026-06-27
Engram: writing user beliefs into model weights
Engram started from a narrow question: what should a personal agent do with a belief that ought to become part of the model, not just another retrieved note?
The answer I built was a split memory path. Ordinary facts, documents, and schedule-like records stay in a reversible RAG store. Durable beliefs and preferences go through a consolidation path and are written into model weights through HoReN. Transient chat noise is ignored.
The routing boundary
The important design choice is the router. A user turn is extracted into memory
candidates, then classified as belief, fact, other, or low-confidence
noise. Beliefs enter an edit buffer; facts and other reversible context stay
retrievable.
That boundary matters because RAG and model editing solve different problems. RAG is good for reversible facts. Weight-level edits are for durable preferences that should survive retrieval being turned off.
Attribution as the proof
The demo is built around attribution rather than vibes. Teach a durable belief,
consolidate it, then ask the probe with retrieval disabled. If retrieved == []
and the answer still recalls the taught belief, the knowledge is living in the
edited module rather than the prompt.
The edit module can also be toggled off and on. When it is off, the belief disappears; when it is on, the belief comes back. That is the useful distinction between storing more context and actually changing the model's memory path.
What changed from a generic model-editing backend
HoReN provides the editing backend. Engram adds the personal-memory layer around it: extraction, routing, consolidation, provenance records, and answer-free canonical key prompts for user beliefs.
Personal belief queries often look too similar: "What do I believe?", "What is my preference?", "What should I choose?" Engram adds extra keys derived from the subject, relation, and belief statement so similar query forms can still retrieve the right edited memory without leaking the answer into the key.
Current limits
This is a hackathon prototype, not a universal assistant. It is scoped to a single-user personal Q&A setting, with RAG still serving as the right store for facts, documents, schedules, and reversible content.
The part I care about is the shape of the system: live learning, local edits, and attribution. A memory system should not only remember; it should be able to explain where the answer came from.