Lorelan

How it works

How AI story games remember what you did, and why they still forget

The language model behind an AI story game remembers nothing at all between turns. Every time you act, the game rebuilds what the model sees from scratch. So “memory” in these games is really a question of what goes into that rebuild, and the answer has changed a lot in a few years.

Published

The short version

Each turn, the game sends the model a prompt: instructions, some facts about the world, the recent story, and your action. The model writes the next scene from that and nothing else. Anything that isn't in the prompt doesn't exist for that turn. A game that “remembers” a character from an hour ago is one that chose to put that character back in. Here are the layers games use to do it, roughly in the order the genre adopted them.

Layer 1: the recent story

The simplest memory is the text itself: the last however-many turns, pasted in. Context windows have grown from about a thousand tokens in 2019 to a hundred thousand or more in many current models, so a game can now include a lot of recent story. Two things stop that being enough on its own. Every token is paid for on every turn, so a long window makes each turn more expensive. And models attend unevenly to long inputs: research has found they use information at the start and end of a long text better than information in the middle. A detail from forty turns ago may be in the window and still be ignored.

Layer 2: notes that are always there

Early games added a box of notes that goes into every prompt: who you are, what you are trying to do, the tone. AI Dungeon calls its version Plot Essentials; NovelAI has Memory and an Author's Note, which sits near the end of the prompt so it carries extra weight. They work well, with one catch: you write and maintain them. When the story moves on and the note doesn't, the note starts pulling the story backwards.

Layer 3: lore that appears when it is mentioned

A lorebook (SillyTavern calls it World Info, AI Dungeon calls its entries Story Cards) is a set of entries that are added to the prompt only when a keyword shows up: mention the Ashgrove family and their entry appears. This lets a world hold far more detail than any prompt could. Its weak points are keywords that never come up (the entry is never seen), keywords that come up too often (it crowds out everything else), and a budget that, once full, quietly drops entries.

Layer 4: summaries of what came before

As a story grows, games compress older chapters into summaries and keep those instead of the full text. Summaries are efficient and keep the outline of events. What they lose is wording: the exact phrasing of a promise, the text of a letter, the line someone said that you meant to throw back at them later.

Layer 5: a record of the world, written every turn

The biggest recent change is that games now extract structured facts from the story as it happens and keep them as records rather than prose. Voyage describes a World Engine that tracks characters, objects and relationships separately from the prose. Lorelan runs a separate pass after each turn that updates its records of the story:

  • People: who they are, what they look like, and how each relationship stands, with old states retired when they change rather than piled up.
  • Objects: who holds what, and what has happened to it, so a broken lantern stays broken.
  • Places: where you have been and what you found there.
  • Knowledge: what has been established, and who knows it, so a character who wasn't in the room doesn't know what was said there.
  • Moments and commitments: the promises, threats and turning points the story should come back to.

Records have two advantages over prose. A game can look things up by who and what is in the current scene, instead of hoping a keyword appears. And it can tell the narrator which facts are settled: Lorelan gives the narrator the things that can't be undone, such as a letter already burned or a door already forced, in their own section of the prompt, separate from the story text.

Layer 6: finding things by meaning

Keyword matching misses things said in other words. Many games now also store each memory as an embedding, a numerical fingerprint of its meaning, and retrieve the memories closest in meaning to the current scene. If you return to “the place where we buried the dog”, a meaning-based search can find the orchard scene even though you never said “orchard”. Lorelan combines this with the records above when it builds each turn.

Why AI story games still forget

  • The wrong memory gets picked. Retrieval is a guess about what the next scene needs. When it guesses wrong, a relevant fact stays out of the prompt.
  • Exact words get lost. A letter quoted faithfully a few turns after it was written can come back reworded twenty turns later, once the original has been folded into a summary. Every product we have tested shows some version of this.
  • False things get recorded as true. If the narrator goes along with something a player claims, the memory pass faithfully records it, and now the mistake is canon. Deciding what a player is allowed to establish is one of the hard design problems in this genre.
  • Budgets run out. Every layer competes for the same prompt. Something always gets left out; the craft is in choosing what.

What you can see and change in Lorelan

Most of this runs in the background, so you can just play. If you want to look under the hood, the World panel shows the story's current focus, your location and inventory, the open threads, and the people and lore you have met. Turn on Director Mode in Settings and you also get an Author's Note, a note to the narrator for the next turn only, the lorebook, and the ability to edit a turn. You can rewind to an earlier turn and choose differently, and the records rewind with you.

For the wider history of how these games got here, read AI choose-your-own-adventure games: what has changed since 2019.

Try a story

Free credits when you confirm your email. No card needed.

Read next

Sources