Return to Index

Lorebook

image

The Lorebook allows you to create entries for specific elements in your story. This helps the AI have more information about characters, places, items, concepts and so on.

Click the 📗 button on the input bar, or in the "Lorebook Quick Access" area of the Story tab on the right, to open the main lorebook window.

You can import a Lorebook file by clicking the 📥 Import button at the top left. Once you're done you can export with 📤 Export. The 🖼️ icon lets you create a lorebook embedded in an image.

Click the funnel icon to sort entries alphabetically or by timestamp.

Click the 🔎 icon to perform a search.

Basics

Click ➕ Add Entry to create a new entry. Only the content and settings are read by the AI. The entry name is just an identifier.

You will be presented with this window:

image


Entries

A lore entry is composed of two main elements: Entry Text and Keys.

The Entry Text is what will be injected into the context window when a Key is triggered. Balancing out the density of this content with the remaining space in your context window is important.

The Default Settings will be applied to all new entries, but they can be changed after creation.

You can mass-select entries with the checkbox ☑️ to delete 🗑️, export 📤, or export to image 🖼️ several entries at once.

Keys

Enabled determines if the entry will be inserted in the context if detected. If it is disabled, it won't trigger regardless of keys. This is useful to reduce context cluttering if you don't need details about specific things.

Keys are all the words that the AI will associate with this entry. If the AI reads this word, then the connected entry will be inserted in the context. Keys are case insensitive.

Type the key and press Enter to register it. Keys are case insensitive by default. To make a Key case-sensitive, preface it with / and close it by /: /Entry/.

Keys are automatically bounded (i.e they stop checking after what you have written. So if you write "Ai", it checks for "Ai" and then stops. "Aiming" wouldn't work, thus.), unless they start or end with a non-letter character.

If it is part of a placeholder, add a $ at the very beginning before the first dash.

If you require more complex Key matching, make sure to check the Using Regex guide.

Lore Generation

Click the 💡 Generate button to enter the Lore Generator.


Categories

Click ➕ Add Category to create a new category.

Categories allow you to organize Lorebook Entries, but also create a Subcontext. You can define default settings for all entries in the category as well.

A subcontext is basically a block in the main, complete context. All entries of the category will be inserted, then organized according to their settings, in this block only. This helps reduce "spreading out data" by packing similar information together.

The entries' individual placement settings will be applied relative to other entries in the block only. i.e If an entry has an placement position of -2 newlines, it will be inserted 2 newlines before the last line of the last inserted entry in the subcontext block.

The entire subcontext is then inserted as one block according to its own placement settings.

This is useful if you want to lump a certain type of entries together, or use something like Scaffolding where every type of content has its own settings.

Placement Tab

image

Accessed by clicking the Placement tab. If this tab is active, you can click Dock Active Tab to the Side to make it show up at all times. Click Undock to remove it.

You may also use a \n (a newline marker), which helps isolate the entry further by separating it with a full newline.

As an example, if you set it to -3 Newline, then it will insert the entry's text as soon as it finds the third newline, reading back from the bottom of the window. -1 will mean it is always placed at the very bottom of the Context, just as positive 1 will always place it at the very top of the Context. 0 will always be the very top.

Attention: If an entry is inserted after a subcontext, then it may insert itself into that subcontext's text area.

Lorebook Phrase Bias

image

If this tab is active, you can click Dock Active Tab to the Side to make it show up at all times. Click Undock to remove it.

Explained in Phrase Bias, although this has an extra setting: When Entry Inactive, which enables the biases if the entry is not active! This can help activate things randomly, such as monster encounters.

Phrase biases in entries can otherwise be used to favor nicknames for a person (such as referring to their job, or a shorthand), and terms relative to them.


Lore Generator

image

The Lore Generator is a powerful tool that allows you to generate Lore for several types of objects, people, and concepts.

First, select a type from the dropdown, choosing one that fits the type of content you want generated. They may appear a little broad, so see which is the closest fit.

If you need the AI to be aware of elements in the Story, Memory, Author's Note, or Lorebook, open Add Context (Advanced), and tick their respective boxes or enter Keys that will activate Lorebook Entries that you want the AI to be aware of when you generate the Lore Entry.

Once you are ready, type into Input Text:

Here is an example:

Type selected: Concept
FTL Travel (Space Folding, Instantaneous)

Press ▶ or Ctrl/Cmd⌘+Enter to generate. Click 🔃 to retry the last generation. You can freely edit the text, and keep generating, just like in the main text editor!

Generation History is similar to the Redo Tree, displaying the last generations for all entries. The list is purged on refresh.