How does a lorebook work?
A lorebook is a list of entries, and each entry has two parts:
- Keys: the words or phrases that trigger the entry, like a character's name or a place.
- Text: what the AI should know when one of those keys comes up.
Before the AI writes a reply, the app scans the most recent messages for keys. Whenever one of those keys shows up, the app includes that entry in what the AI reads for that turn and leaves the rest out. NovelAI's documentation calls them activation keys and defines them as "the words or phrases that activate a lorebook entry when found in the recent story." [1] In SillyTavern, the scan depth setting decides how many recent messages get checked. [2]
For example, a lorebook entry for a story character might look like this:
Keys: Mira, the lighthouse Text: Mira is the lighthouse keeper's daughter. She is 19, distrusts sailors, and keeps her late mother's compass in her coat pocket.
When Mira comes up in the chat, the bot gets that paragraph alongside the conversation, and the rest of the time it stays out and takes up none of the bot's working memory.
What each app calls it
| App | Name | When it triggers |
|---|---|---|
| NovelAI | Lorebook | Activation keys in the recent story trigger the entry, with a search range of up to 10,000 characters, and entries can also be set to "Always On". [1] |
| SillyTavern | World Info (also "Lorebooks" or "Memory Books") | Keywords in recent messages trigger the entry, and scan depth sets how many messages get checked. [2] |
| Character.AI | Lorebook (beta) | Entries activate on keywords, and one Lorebook can be linked to several Characters. Creating one needs c.ai+ during the beta. [3] [4] |
Lorebook, pinned memories and persona: what's the difference?
- Lorebook: notes about the world or characters that the app brings in only when a keyword appears.
- Pinned memories: messages from the chat itself that you pin so the bot keeps them in view.
- Persona: the description of yourself that the bot reads in every chat.
- Character definition: the description of the character that stays in view all the time. Character.AI's help page puts it this way: "always relevant goes in the Definition, sometimes relevant goes in the Lorebook." [3]
Why didn't my lorebook entry work?
When an entry doesn't show up in the bot's reply, it is usually for one of four reasons:
- The exact keyword wasn't used: if the entry's key is "Mira" and the chat only says "the keeper's daughter", plain keyword matching won't catch it.
- The keyword is too far back: the word did come up, just too many messages ago for the app's scan depth or search range to check.
- Too many entries triggered at once: In NovelAI, when a lot of entries match at the same time, the app puts them in order and leaves out whatever doesn't fit. Entries with a higher insertion order go in first, and the rest get whatever room is left. [1]
- Two entries disagree: if one entry says Mira is 19 and another says 22, the bot may go with either one or switch between them.
Do you need a lorebook?
If you write stories, run a roleplay world or play a character with a big cast, a lorebook is one of the best tools you have for keeping a whole world straight.
If you want to talk about your own life rather than run a story, keeping a lorebook means writing down by hand what a friend would remember on their own, from the people in your life to what you were nervous about yesterday.
In Neptunian, you make your own AI companions and talk to them with no entries to write, keys to set or lorebook to keep up. In the chat on this page, Cass heard once about an 80-pound golden retriever stealing a sandwich, and when the story came back days later with a chihuahua she asked “did the 80 pound golden retriever shrink into a chihuahua”. Companions also sometimes text you first to ask how something went.
Closeness takes its own time.You can’t flatter or rush your way there, because it grows from how the two of you actually get along.Sign in free →




