What a lorebook does
Every AI model reads a limited window of text, and a living world has more facts than any window holds. A lorebook solves that by keeping facts on standby. Each entry waits outside the prompt until one of its keywords shows up in the story, then steps in for as long as it’s relevant.
Say your world has a fortress called Ironhold. Its entry might have the keys “Ironhold” and “the Iron Gate” and three sentences of content: who holds it, what it guards, what it costs to get in. For most of the story the AI never sees that entry. The moment you write “We ride for Ironhold,” it joins the prompt, and the AI describes the right walls, the right banners, and the right captain.
Different apps use different names for the same idea:
- World Info in SillyTavern, also called a world book, which can be global or tied to one character.
- Character book, the lorebook embedded in a character card.
- Lorebook in NovelAI.
- Story cards in AI Dungeon.
- Lore cards in LoreWeaver.
A lorebook isn’t the same as memory. Lore is canon you write ahead of time; memory is what happened, written down as you play. Strong long stories use both, and how AI memory works covers the second half.
The anatomy of a lorebook entry
The details vary by app, but most entries share the same parts:
| Part | What it does |
|---|---|
| Keys | Words or phrases that activate the entry when they appear in the scanned text, also called triggers or keywords |
| Secondary keys | An optional filter. SillyTavern combines them with the main keys using AND ANY, AND ALL, NOT ANY, or NOT ALL logic |
| Content | The text added to the prompt when the entry fires |
| Constant | Always inserted, keys or not. SillyTavern marks these with a blue circle, and NovelAI calls them Always On |
| Insertion order | Sorts entries that fire together and decides which win when space runs out. Apps disagree on direction, so check yours |
| Position | Where the content lands: before the character definition, after it, or at a set depth in the chat |
| Case and whole words | Whether “Ash” must match exactly, and whether it can match inside “ashes” |
| Enabled | A switch that keeps an entry without using it |
Some apps go further. SillyTavern adds a trigger probability, inclusion groups that let only one of several entries fire, and timed effects (sticky, cooldown, and delay) that control how long an entry stays active. NovelAI adds key-relative insertion, which places an entry right next to its key in the story, and phrase bias, which nudges the AI toward or away from certain words.
Scan depth, token budgets, and recursion
Scan depth
Scan depth is how much of the recent story the app searches for keys. SillyTavern counts messages, so a depth of 1 checks only the last message. NovelAI counts characters, with a search range of up to 10,000. AI Dungeon checks your input and the AI’s output, and a triggered story card stays in context for a while, depending on how much room there is.
Depth is a trade-off. Scan too little and a character still in the room drops out the moment everyone says “she” instead of her name. Scan too much and entries from scenes long past keep crowding in.
Token budget
The budget caps how much of the context window lore can use. SillyTavern sets it as a share of the context or a fixed number of tokens and inserts constant entries first. NovelAI has a token budget plus reserved tokens per entry, and the V2 card spec defines a token_budget with a priority per entry. When the budget fills, the lowest-priority entries are left out.
Recursion
Recursion lets entries trigger other entries: if the content of “House Varn” mentions “Lady Sela”, her entry fires too. SillyTavern calls this recursive scanning and lets you mark entries as non-recursable, stop further recursion, delay an entry until recursion, and cap the number of passes. NovelAI’s version is cascading activation, which lets an entry find its keys in other non-story context. Recursion brings linked lore along naturally, and it can also cascade into a chain that eats the budget, so use it on purpose.
How LoreWeaver’s lore cards work
LoreWeaver’s lore cards are lorebook entries with a few opinions built in. Each card has a title, a category, a description, tags, an importance rating, an optional image, and two switches: Pinned (always include) and Active (available at all). Worlds start with Character, Location, Faction, Item, Event/History, and Misc categories, and you can add your own, up to 50 per world.
Here is how a card reaches a reply:
- Pinned cards always come in. Use the pin for the handful of facts every scene needs.
- Other active cards wait for their names. A card qualifies when its title or one of its tags appears in the text LoreWeaver scans: your new message plus the recent conversation, from both sides.
- Matching is by whole words, in any case. “Ash” matches “ash” and “ASH” but not “ashes”, so add plural and nickname tags where they matter. A card’s description is never scanned.
- The strongest matches win. Pinned cards rank first, then cards by match strength (a title match counts for more than a tag) plus importance.
- The budget decides the rest. Cards fill the lore share of your plan’s context. When many qualify, lore can borrow room from the story history, and space other parts of the prompt leave unused can admit extra cards. Whatever still doesn’t fit sits out that reply.
Two features stand in for the advanced settings other apps expose:
- The Loom can pin or unpin a card, switch it on or off, change its importance, swap its description when a secret comes out, pin it for a set number of turns, or force it in or out for a single reply. Loom directions that name a character can bring that character’s card in, too. The Loom guide lists every lore action.
- LoreMaps draws your cards as a graph of relationships. Turn on “Use map to expand story context”, and cards closely connected on the map to the ones already chosen can come along, within a small share of the lore space. It’s recursion you can see and edit.
To see what happened on a recent reply, tap a highlighted name for its trigger tooltip, or open the context inspector, which lists every card included and the words that triggered it. On Plus and up, Emergent Lore Detection also reads the story and suggests new cards for the characters and places the storyteller invents, and you keep or dismiss each one.
Lorebook features compared
| Feature | SillyTavern World Info | NovelAI Lorebook | AI Dungeon story cards | LoreWeaver lore cards |
|---|---|---|---|---|
| What triggers an entry | Keys, plain or regex, with optional secondary keys | Keys, plain or regex | Triggers | The card’s title and tags |
| Always-on entries | Constant | Always On | Not per card | Pinned |
| How keys match | Whole words and any case, by default | Any case, though regex keys are case-sensitive | Any case, including inside longer words | Whole words, any case |
| Text that is scanned | A set number of recent messages | A set number of recent characters | Your input and the AI’s output | Your new message and the recent conversation |
| Space limit | A share of context or a token budget | A token budget and reserved tokens | Cards drop out as context fills | The lore share of your plan’s context |
Details for SillyTavern, NovelAI, and AI Dungeon come from their official documentation as of October 2026.
Importing World Info, NovelAI lorebooks, and AI Dungeon story cards
LoreWeaver imports lore into any world. Open the world, go to the Lore tab, and choose Import lore. The importer recognizes:
- SillyTavern World Info files (.json)
- NovelAI lorebooks (.lorebook)
- AI Dungeon story card exports (.json)
- Tavern character cards (.png, .charx, or .json), which add the character as a card followed by its lorebook
- LoreWeaver’s own lore exports
Whole stories come in through Import in My Stuff instead: AI Dungeon adventure exports (.zip), NovelAI .story and .scenario files, FictionLab chats, character cards, and LoreWeaver world exports. Moving over from another app entirely? See how LoreWeaver compares with SillyTavern, NovelAI, and AI Dungeon.
| In the source | In LoreWeaver |
|---|---|
| The entry’s name or comment (SillyTavern), display name (NovelAI), or title (AI Dungeon) | The card’s title |
| Keys and triggers | Tags |
| Content, text, or entry | The description |
| Constant (SillyTavern) or Always On (NovelAI) | Pinned, at top importance |
| Disabled entries | Kept, but switched off |
What doesn’t come across: secondary keys and their logic, regular-expression keys (they won’t fire), insertion order, position and depth, probability, groups, timed effects, budgets, and NovelAI’s search range and key-relative insertion. Decorators such as @@depth are removed from entry text. LoreWeaver’s own rules take over, so a quick tidy-up pays off:
- Add plural and nickname tags. LoreWeaver matches whole words, so an AI Dungeon trigger like “boat”, which also caught “boats” there, needs both forms here.
- Re-pin only the essentials. Constant entries arrive pinned, and every pinned card costs space on every reply.
- Set importance on the cards that should win when space is short.
- Sort categories. Categories are guessed conservatively, and unclear entries land in Misc.
- Play a few replies and open the context inspector to confirm the right cards fire.
Writing entries that fire at the right time
- One subject per entry. A card for the Harbor Guild and another for its guildmaster beats one card about both.
- Choose specific keys. Names, nicknames, titles, and the plural forms people actually type. Avoid common words: a key like “king” fires in every royal scene, while “Aldric” fires when he matters.
- Lead with what a scene needs. Who or what it is now, what it wants, and how it sounds or behaves. Two to six sentences in the present tense usually beat a page of history.
- Don’t repeat the premise. Anything already in the world’s premise or the character definition is in every prompt anyway.
- Pin sparingly. Constant or pinned entries are for rules the whole story depends on, not favorites.
- Link on purpose. In apps with recursion, mention related names in an entry’s content only when you want them to follow. In LoreWeaver, draw the link on the LoreMap instead.
- Test the trigger. Say the key in a message and check what the AI received.
A compact LoreWeaver card:
- Title: The Drowned Bell
- Category: Item
- Tags: drowned bell, bell tower, harbor bell
- Description: A bronze bell lost when the harbor flooded forty years ago. Fishermen swear it rings beneath the water before a death at sea. The Harbor Guild pays divers to stay away from it and won’t say why.



