Guide · Lore

Lorebooks and World Info explained Lore that waits for its cue.

How lorebooks keep a world’s facts on standby until the story calls for them: keys, scan depth, budgets, and recursion in SillyTavern, NovelAI, and AI Dungeon, and how LoreWeaver’s lore cards do the same job.

Written by
The LoreWeaver team
Updated
October 3, 2026
Reading time
10 minutes
An open book of star charts on a desk with a quill and wax seals, a castle beyond the window

The short answer

What is a lorebook in AI roleplay?

A lorebook, called World Info in SillyTavern, is a set of entries that are added to the AI’s prompt only when their keywords appear in the recent conversation, so a world can hold far more lore than the context window. Each entry pairs keys with content, plus settings such as constant (always on), insertion order, scan depth, and a token budget. On LoreWeaver, lore cards work the same way: a card joins a reply when it is pinned or when its title or a tag appears in recent messages.

Updated

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:

PartWhat it does
KeysWords or phrases that activate the entry when they appear in the scanned text, also called triggers or keywords
Secondary keysAn optional filter. SillyTavern combines them with the main keys using AND ANY, AND ALL, NOT ANY, or NOT ALL logic
ContentThe text added to the prompt when the entry fires
ConstantAlways inserted, keys or not. SillyTavern marks these with a blue circle, and NovelAI calls them Always On
Insertion orderSorts entries that fire together and decides which win when space runs out. Apps disagree on direction, so check yours
PositionWhere the content lands: before the character definition, after it, or at a set depth in the chat
Case and whole wordsWhether “Ash” must match exactly, and whether it can match inside “ashes”
EnabledA 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:

  1. Pinned cards always come in. Use the pin for the handful of facts every scene needs.
  2. 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.
  3. 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.
  4. The strongest matches win. Pinned cards rank first, then cards by match strength (a title match counts for more than a tag) plus importance.
  5. 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

FeatureSillyTavern World InfoNovelAI LorebookAI Dungeon story cardsLoreWeaver lore cards
What triggers an entryKeys, plain or regex, with optional secondary keysKeys, plain or regexTriggersThe card’s title and tags
Always-on entriesConstantAlways OnNot per cardPinned
How keys matchWhole words and any case, by defaultAny case, though regex keys are case-sensitiveAny case, including inside longer wordsWhole words, any case
Text that is scannedA set number of recent messagesA set number of recent charactersYour input and the AI’s outputYour new message and the recent conversation
Space limitA share of context or a token budgetA token budget and reserved tokensCards drop out as context fillsThe 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 sourceIn LoreWeaver
The entry’s name or comment (SillyTavern), display name (NovelAI), or title (AI Dungeon)The card’s title
Keys and triggersTags
Content, text, or entryThe description
Constant (SillyTavern) or Always On (NovelAI)Pinned, at top importance
Disabled entriesKept, 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:

  1. 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.
  2. Re-pin only the essentials. Constant entries arrive pinned, and every pinned card costs space on every reply.
  3. Set importance on the cards that should win when space is short.
  4. Sort categories. Categories are guessed conservatively, and unclear entries land in Misc.
  5. 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.

Questions

Lorebooks and World Info, answered.

01What is the difference between a lorebook and World Info?

Nothing fundamental. World Info is SillyTavern’s name for a lorebook: entries that join the prompt when their keys appear. A character book is a lorebook embedded in a character card.

02What is scan depth in a lorebook?

Scan depth is how much recent text the app searches for keys, counted in messages in SillyTavern and in characters in NovelAI. A deeper scan catches older mentions but lets more entries crowd in.

03What does a constant entry do?

A constant entry is inserted on every reply whether or not its keys appear. LoreWeaver’s equivalent is pinning a lore card.

04Can I import SillyTavern World Info into LoreWeaver?

Yes. Open a world’s Lore tab and choose Import lore. Entries become lore cards with their keys as tags, and constant entries arrive pinned; regex keys and secondary keys don’t carry over.

05Why isn’t my lore card showing up in replies?

Check that the card is active, that its exact title or a tag appears in recent messages as a whole word, and that it isn’t being outranked when space is short. The context inspector shows which cards were included and why.

06Do NovelAI lorebooks and AI Dungeon story cards work too?

Yes. NovelAI .lorebook files and AI Dungeon story card exports import into any world’s Lore tab, and whole AI Dungeon adventures and NovelAI stories import from My Stuff.

Keep reading

Pull another thread.

Put it to work

Where this guide leads in LoreWeaver.