← Roleplay terms explained

What is a lorebook (World Info) in AI roleplay?

Updated

A lorebook, called World Info in SillyTavern, is a list of short notes about a story's world, each tied to trigger keywords. When a keyword appears in recent messages, the app quietly adds that note to the prompt, so the model knows about a place, person or rule only when it matters instead of carrying every fact all the time.

Try it now, free, no account neededStart a story with Captain Juno ReyesSmuggler captain, one bad deal from ruin

How an entry works

Each lorebook entry has at least two parts: the keywords that switch it on and the content that gets inserted. A typical entry:

Keys: Blackwater, the harbour Content: Blackwater is a smugglers' harbour run by the Tide Guild. Strangers pay a silver toll at the gate. The guild boss, Old Fen, owes Juno a favour she has never cashed in.

If you write "we should lie low in Blackwater", the app scans the recent messages, sees the key, and adds the content to what the model reads for that reply. Twenty messages later, when nobody has mentioned it, the entry drops out again and the space goes back to your story.

Most apps add extra controls: entries that are always on, how many recent messages to scan, where in the prompt the note goes, an insertion order when several fire at once, and a token budget for the whole lorebook.

Why use one instead of a longer card

Everything in a character card is read on every reply. A world with ten cities, five factions and a magic system would take thousands of tokens if you put it all in the description. A lorebook keeps the card short and brings in only the slice of the world the scene needs, which leaves more of the context window for the actual conversation.

Common mistakes

  • Keywords that are too common. A key like "the" or the main character's name fires on every message, so the entry is effectively always on.
  • Entries that are too long. Keep each one to a few sentences of facts the model can use.
  • Writing entries as dialogue or story. State facts plainly; the model handles the prose.
  • Forgetting plurals and nicknames. If people call the city "the Cove" as well, add both keys.
  • Entries that toggle near the top of the prompt in a long chat. In SillyTavern this makes the whole chat get re-read, which slows replies; placing them deeper helps.

Lorebooks in UnsavedAI and other apps

SillyTavern calls them World Info and lets you attach them to a character, a chat or globally. Character Card V2 can carry one inside the card as character_book. Other apps have similar features under names like memory or lore.

If you connect SillyTavern to UnsavedAI with an API key from /setup, your World Info works as normal, because SillyTavern builds the prompt and we just run the model. On the UnsavedAI site itself, house characters carry their world in the description and scenario: Captain Juno Reyes and Grimm the Dungeon Master are good examples of a setting that unfolds as you play. For your own characters, put the facts that matter in every scene into the description.

Questions people ask

Is a lorebook the same as memory?

Not quite. A lorebook is written ahead of time and fires on keywords. Memory usually means notes about what has already happened in your chat, written by you or summarised by the app.

How many entries should a lorebook have?

As many as the world needs, as long as each is short and has specific keys. A dozen tight entries usually beat three long ones.

Do lorebook entries count toward context?

Yes. When an entry fires, its text is part of the prompt and uses tokens like anything else.

Characters for this story