AI Lorebooks Explained: Keywords, Scenes, and Story Rules

XMLans Posted on 2026-05-11 17 Views


A lorebook stores background information that an AI role-play application can insert when it becomes relevant. A clear character prompt sets the basic identity; a lorebook adds places, events, relationships, and other details without loading every entry on every turn.

Why use a lorebook?

Putting an entire fictional world into a permanent system prompt can be expensive and confusing. Keyword-triggered entries let the application add the relevant material to the model's context. They still consume tokens when activated, and their effect depends on the platform's configuration.

Keywords and activation

An entry normally contains trigger words and content. A matching phrase in the user's or character's message can activate that entry. The example below responds to doubts about whether one person can make a difference with a reassuring line from the character.

Example lorebook entry with keywords and activation settings

Insertion order and activation probability control how entries are used. Their exact interpretation differs by platform; do not assume that a smaller number always means higher importance. A probability setting can also create chance events in a game, such as a 20% chance of finding an item.

Relationships and a larger world

You can use entries to reinforce affinity changes or specify how a character behaves in a particular location. Add place names as triggers and describe what makes each place distinctive. For example:

When {{user}} feels better, the character may suggest a quiet outing.
Forgotten Library: A wooden bookshop beneath a huge banyan tree. Visitors place painful memories in its hollow, and the tree turns them into falling leaves.
Tidal Coast: Waves offer a calming rhythm. Translucent shells hold other people’s good luck and dreams.
Starlight Plain: Flowers open only at night, glowing like a galaxy on the ground. The character says, “The world is vast, but you are my only point of reference.”

Story direction

For fan role-play, recognizable phrases can trigger your own summaries of relevant scenes or background. This can improve continuity without expecting the model to know every detail of the source work.

Read the SillyTavern World Info documentation for one implementation. You can discuss the guide in the Star Dream Telegram community.

Adapted from the original Chinese article, published on May 11, 2026.

Hi! I frequently update with various articles about technology, practical tips, and cutting-edge news. I hope it will be helpful to you!
Last updated on 2026-09-30