Skip to content

Lorebooks (World Info)

A lorebook is a named set of trigger-keyword entries that Pyre injects into the prompt only when they become relevant. It keeps persistent world facts available without spending context on every entry every turn.

What a lorebook is

Think of a lorebook as a reference binder for a setting. Each entry watches for keys. When a key appears in the recent conversation, the entry's content is slipped into the next prompt. Constant entries fire every turn.

Entry fields

Field What it does
Keys Main trigger keywords.
Content Text injected when the entry fires.
Constant Always-on entry.
Enabled Disable an entry without deleting it.
Order Priority used when fired entries are sorted.
Secondary keys AND / NOT logic for narrower matching.
Case / whole-word Per-entry matching overrides.
Probability Chance for the entry to fire after matching.

By default, scanning is case-insensitive and whole-word. SillyTavern World Info imports preserve selective keys, probability, order, and related fields where Pyre supports them.

How scanning works

Before each turn, Pyre scans a recent message window for matching keys. Fired entries are deduped and sorted deterministically: priority first, then stable tie-breaks so the same inputs produce the same prompt order.

Constant entries are included regardless of keywords. Disabled entries are skipped.

Where active books come from

Active lore is additive and deduped:

  • Chat-attached books for this specific conversation.
  • Character-bound books from every character in the chat.
  • Persona-bound books from the active persona or persona-party roster.

In group chats, every member's bound books participate. In persona-party chats, every selected persona's bound books participate too.

Per-chat override

You can disable an inherited character/persona book for one chat without unbinding it globally. The book stays attached elsewhere; it simply sits out this conversation.

Embedded books

Cards can carry character_book data.

  • On import, Pyre can extract it as a normal lorebook or keep it hidden and bound to that character.
  • On export, bound lorebooks merge back into the card PNG's character_book so the world travels with the card.

BotBooru Download JSON

On a BotBooru lorebook page inside embedded Discover, Download JSON imports the book into Pyre after a confirmation showing the name and entry count.

This works on Android, Windows WebView2, and web/PWA when served by a paired desktop or self-host hub. Platforms that open Discover externally can still import the downloaded JSON file.

AI lorebook building

The main Creator can build lorebooks inside the Creator Sheet. It drafts entries with keys, content, constant flags, and supported trigger options, then lets you inspect and edit before saving.

When building a character or persona, the Sheet can also draft a bound embedded lorebook. Saving the asset materializes that draft as a hidden bound book.

Focused lorebook entry building is available from lorebook management in the library.

Managing lorebooks

Lorebooks live with the library rather than as a buried settings-only feature. Use the Characters/Personas library segment to create, import, edit, export, copy, or bind books.

Diagnostics

The scan trace shows which entries influenced a turn: matched keyword, constant entry, disabled skip, count scanned, and count fired. Use it when a fact did or did not appear in the prompt.

See also