SillyTavern World Info guide: keys, scan depth and order
Updated
Open the World Info panel, create a lorebook and add one entry per place, person or rule: a few specific keywords, then two to four sentences of plain facts. Keep scan depth around 2 to 4 messages, mark only always-true rules as Constant, give the entries that matter most a higher Order, and attach the book to a character or chat. It behaves the same over UnsavedAI's API as anywhere else.
Try it now, free, no account neededStart a story with Tamsin RookA cartographer of islands that drift. Yours is drifting toward the Edge of the world, and they're thrilled.One entry, built start to finish
If you only need the idea of a lorebook, the lorebook explainer covers it. This page is about making entries in SillyTavern that switch on when you want and stay quiet otherwise. Here is a complete entry for an invented sky-harbour setting:
- Title / memo: Harbour of Vey
- Primary keywords: Vey, floating harbour, the chained isles
- Optional filter: empty
- Content: [Vey: a harbour built on three islands chained together, drifting east about a mile a day. Docking costs one page of a working map. The harbourmaster, Odile, is blind and knows every ship by the sound of its hull. Open flame is banned on the docks after dark.]
- Strategy: normal (keyword-triggered)
- Position: after the character definitions
- Order: 100
Three choices make this entry work. The keywords include the phrases people actually type, not just the proper name. The content is facts, not prose, so the model weaves it into its own voice. And the brackets mark it as background information rather than a line someone said.
Keywords that fire when you mean them
Primary keywords are comma-separated, and any one of them is enough to trigger the entry. Add plurals, nicknames and possessives yourself ("Odile", "the harbourmaster"), or turn on whole-word matching and write a regex key instead, such as /\bodile'?s?\b/i, which catches Odile and Odile's in any case.
The optional filter narrows an entry down with a logic setting: AND ANY, AND ALL, NOT ANY or NOT ALL. A second entry shows why that is useful:
- Title: Odile's secret
- Primary keywords: Odile, harbourmaster
- Optional filter (AND ANY): lie, secret, blind, truth
- Content: [Odile is not fully blind. She sees shapes and light, and hides it because people speak freely in front of a blind woman.]
Now the secret only enters the prompt when Odile comes up alongside talk of lying or her eyes, instead of every time a ship docks.
Strategy, order and position compared
| Setting | What it does | Use it for |
|---|---|---|
| Constant | Inserted on every reply, keywords ignored | One to three laws of the world, such as how magic costs blood |
| Normal | Inserted when a keyword appears in the scanned messages | Places, people, factions, items |
| Order | Decides where entries in the same position sit; higher numbers go later, nearer the reply | Raise it for entries that must win when two conflict |
| Position | Before or after the card, around the author's note, or inside the chat at a depth | Deeper in the chat for facts about the current scene |
| Trigger % | Rolls a chance to insert an activated entry | Rumours, weather, occasional flavour |
In-chat positions use the same counting as the author's note; chat depth explains it. Changeable entries placed deep in the chat also keep the top of the prompt steady, which helps speed on services that reuse an unchanged prompt start.
Scan depth, budget and recursion
Scan depth is a global World Info setting: how many of the newest messages SillyTavern reads looking for keywords. At 2, a harbour mentioned three messages ago no longer counts, and the entry drops out. Raise it to 4 or 5 if entries vanish mid-scene; lower it if old mentions keep stale lore hanging around.
The budget caps how much World Info can enter one prompt, as a share of context or a token number. When activated entries overflow it, some are left out, so trimming long entries beats raising the cap. With UnsavedAI's context of about 61,000 tokens and a 56,000 setting, a budget of a few thousand tokens is affordable, but every activated entry is still read on every reply, so lean entries still win.
Recursive scanning lets an activated entry's text trigger other entries: Vey's content mentions Odile, so Odile's entry can fire too. Use the per-entry option that stops further recursion on entries that would chain into half the book.
Attach the book and check it fired
A lorebook does nothing until it is active. You can switch it on globally from the World Info panel, link it to one character through the character's own lore button (it travels with the card when you export, see Character Card V2), or tie it to a single chat. Character lore suits a world that belongs to one card; chat lore suits a campaign that several cards visit.
To test, send a message containing a keyword, then open the prompt view from the reply's message options and look for your entry's text. If it is not there, check in this order: is the book active, is the keyword inside the scan depth, is whole-word matching blocking a possessive, and did the budget cut it. For a living world to practise on, Tamsin Rook charts islands that drift, which is exactly the kind of setting lore entries keep straight.
Questions people ask
Why does my World Info entry never trigger?
Usually the keyword fell outside the scan depth, the book is not active for this chat, or case and whole-word settings block the form you typed. The prompt view shows whether the text was inserted.
Should I put lore in the character card or World Info?
Facts needed in every scene go in the card. Facts needed only when a place or person comes up go in World Info, so they cost nothing the rest of the time.
Can I import lorebooks made elsewhere?
The World Info panel has an import button that takes SillyTavern's own JSON and several other lorebook formats. A card that carries an embedded book offers to import it when you add the card.

