Skip to content
AIRoleplay.Guide

SillyTavern lorebooks (World Info) explained, with a working example

By Cyril · Updated · Checked with SillyTavern 1.19.1

Short answer

A lorebook is a list of entries, each with trigger keywords and a short text. When a keyword appears in the recent chat, SillyTavern inserts that entry into the prompt, so the AI knows the fact only when it is relevant. Keep each entry self-contained and short, keep scan depth low, and bind the lorebook to the character so it travels with the card.

World Info, also called a lorebook, is SillyTavern’s way of giving the AI facts only when they matter. Instead of stuffing every detail of your world into the character description, you write short entries with trigger words. When a trigger word shows up in the chat, SillyTavern adds that entry to the prompt.

This saves context, which matters a lot on local models: on our 8 GB test laptop, Ollama only gets 8,192 tokens in our standard setup, and every token spent on unused lore is a token of story the model can no longer see.

How an entry works

Each entry has:

Part What it does
Keys Trigger words. Not case-sensitive by default. Can be regular expressions written between slashes.
Optional filter Extra words combined with the keys using AND ANY, AND ALL, NOT ANY or NOT ALL logic.
Content The only text actually sent to the AI. Keys and titles are not sent, so the content must stand on its own.
Insertion order When several entries fire, a larger number is placed closer to the end of the prompt, where it has more influence.
Insertion position Before or after the character definitions, or among the example messages, and more.

The settings that matter most

Where a lorebook can live

SillyTavern can attach lorebooks in several places, inserted in this order by default: chat lore, then persona lore, then character lore or the global lore.

A real example you can download

Our free card Captain Mara Vell carries a 10-entry lorebook. Two of its entries:

Keys: hold three, hold 3, locked door
Content: Hold three sits at the end of the main corridor behind a Guild-grade lock. Only Mara has the code.

Keys: eat, food, galley, starving, hungry
Content: The galley stores spiced lentils, protein bars, rice, tinned fish and dried fruit, including candied lemon slices.

The second entry is deliberate: in our benchmark, the user says early on that they are allergic to citrus, and later asks for food. The lorebook puts lemon slices on the table; a good model remembers the allergy and keeps them away. We imported this card into SillyTavern 1.19.1 and all 10 entries came through.

Writing rules that work

  1. One fact per entry, written as a complete sentence that makes sense alone.
  2. Several keys per entry: names, nicknames and the words people actually type (“ship”, “freighter”).
  3. Short content. Lore competes with the story for the same context.
  4. Use insertion order for importance, not for sorting.
  5. Test it: mention a key in chat and check that the entry fires.

Questions people ask

Are World Info and lorebooks the same thing?

Yes. SillyTavern's documentation says World Info is also known as Lorebooks or Memory Books.

Does the AI always use an activated entry?

No. The documentation is explicit: an entry guides the AI but does not guarantee the information appears in the reply. That depends on the model.

Sources