How it works
Why AI stories forget, and how Dai Novel remembers.
You spared the bandit on turn eight. On turn forty he walks into the tavern, and the story greets him like a stranger. If you have played AI fiction for long, you know that small, cold moment.
Forgetting is the most common complaint about AI roleplay and AI story games, and it is not laziness on anyone’s part. It comes from how language models read. Here is why it happens, what usually gets tried, and how Dai Novel approaches it, including what it still doesn’t do.
Why AI stories forget
A large language model (LLM) writes each reply from its context window: the text it is given right now, measured in tokens. Everything it “knows” about your story has to fit there. Long stories don’t fit, so something gets cut, and in most chat-style tools the oldest turns are the first to go.
That leaves two bad habits:
- Recency wins. Whatever happened in the last few turns is vivid. The oath from an hour ago is gone.
- Nothing is ranked. A line about the weather and a betrayal take up the same space, and are dropped by the same rule.
The usual fixes are summaries and plain RAG (retrieval-augmented generation: search old turns for text that looks like the current one and paste it back in). Both help. But a summary of everything loses the details that matter, and similarity alone often brings back a scene that merely sounds alike. What a story needs is not a bigger context window. It is the right text, at the moment it matters.
Memory as a story would keep it
Think about how a good novel remembers. It doesn’t replay chapter two. It brings back one detail, the unpaid debt or the broken promise, exactly when the scene needs it. Dai Novel’s memory is designed around that idea: selective long-term memory that stores, scores, retrieves and consolidates the events that should keep mattering.
Working memory
After every turn, what happened is saved as short memory notes. Each note gets an embedding (a vector of its meaning), a score for importance and one for emotional intensity, from 0 to 10, the in-game time, and tags: the characters, places and items it involves, and the events or themes it touches.
Episodic memory
The moments that turned out to matter: promises, betrayals, discoveries, losses, turning points. Once enough weight (importance plus emotion) piles up in working memory, a reflection step reads those notes and writes the lasting ones into this layer. It holds up to 50 memories. When it is full, related memories are consolidated, merged into fewer and denser ones.
World memory
A small set of world-level truths, the facts the setting should keep treating as real from now on. It is made from episodic memory the same way, and holds up to 10.
How the right memory reaches the right scene
The story does not get your whole history pasted into every turn. Before a turn is written, a context step reads your action and picks out what is in the scene: the characters, the location and the items, plus up to five focal points, what the scene is about. Each working memory is then scored on:
- Meaning. Vector similarity between the memory and the scene’s focal points, the same semantic search most RAG systems use.
- Importance and emotion, the two scores the memory got when it was made.
- Who and where. A boost when the memory is tagged with a character, place or item that is in this scene.
- What it is about. A boost when it shares a focal point with the scene.
The ten most recent memories always come along, then the highest-scoring ones, up to thirty. Episodic and world memory are small enough to be sent in full. Everything goes to the model in story order, with in-game times such as “three days ago”.
So when the bandit you spared walks into the tavern, what matters is not that turn eight happened. It is that this person owes you his life. That is the kind of thing later scenes can use:
- a promise a character made,
- a wound you caused,
- a secret that came out,
- a debt that hasn’t been paid.
Places remember too
The who-and-where boost is what similarity alone misses. Say your character grew up in a harbor town and spent childhood afternoons at a small café on the quay. Years later in the story, you walk back in. Ordering a coffee reads like a hundred other scenes, so a search by meaning finds nothing special. But the café is in this scene, so every memory tagged with it is lifted: the owner who slipped you sweets, the evening your father never came to pick you up. The place brings its memories back, the way places do in life.
Memory isn’t the only thing holding the story together
A world that remembers needs more than a diary. Each Dai Novel turn is also written from:
- The current state of the world, which takes priority over what the world looked like at the start.
- Who knows what. A character’s private knowledge, public knowledge and secrets are kept apart, so a guard doesn’t casually mention what only you overheard.
- Where everyone is on the map.
- The current World Phase and the phases it may lead to, so the larger story keeps its direction.
- The world itself. Characters, relationships and rules were authored before you arrived. A world built in advance has far less to forget, because it never had to make itself up.
What not to expect
Honesty is part of the design, so here it is plainly. Memory is bounded and selective. It is not a complete transcript, and it will not recall every minor detail. Compact state tracking handles the facts that must stay reliable right now; memory handles the events that should echo later. The goal is to give important moments a much better chance of coming back, not to promise that every sentence of every turn will be perfect.
The next scene can remember what the last one changed.
Try a story that remembers
The best test is a long one. Make a promise early, break it later, and see who notices. Or build a world of your own and give its people long memories: here is how to start.
Your story waits where you left it
Play a few turns tonight. Come back next week. See what the world kept.
Play a world free or read how memory works in the docs