A SpicyChat Lorebook organizes fictional background information into entries containing keywords and associated content. When a keyword appears within the last four messages from the user or AI character, the corresponding information enters the conversation context for the next generated response.

Lorebooks are useful for developing fictional settings with recurring locations, historical events, organizations, and other background details. Instead of incorporating every piece of information into the character's personality description, you can prepare separate entries associated with relevant subjects.

Each character can have one attached Lorebook, and this functionality is supported only for Private characters. Understanding these restrictions alongside the keyword activation mechanism helps you prepare information suited to your intended conversations.

Understanding Lorebook Entries and Their Components

A Lorebook entry associates a particular subject with information about that subject. Its keywords establish a connection with the conversation, while its content provides the background information that becomes relevant when an associated keyword occurs.

Component Purpose
Keywords Words associated with an entry that can trigger its content when they appear within the recent message window
Content Background information introduced into the conversation context for the next response when the entry is triggered

These components perform different functions. A keyword might identify a fictional building, while the associated content describes its location, history, and significance. The keyword connects the subject mentioned during a conversation with the more detailed information prepared for it.

When organizing a Lorebook, consider which subjects are likely to become relevant at different points in a fictional interaction. Separating unrelated information into individual entries provides a clear relationship between each subject and its associated description.

Writing Content for a Fictional World

Start by identifying the background information that belongs to the fictional setting rather than the AI character's personal identity. This might include descriptions of important locations, historical records, local institutions, or events that influence the setting.

For example, imagine a fictional town with an observatory and an archive. Both locations are relevant to the same story world, but each has a distinct purpose and background.

Illustrative entry: Observatory

Keyword: observatory

Content: The observatory stands on a hill overlooking the town and houses a historical telescope. Astronomers once used the building to document unusual celestial events.

Illustrative entry: Archive

Keyword: archive

Content: The archive contains astronomical records and historical observation logs. Its collection includes documents describing research conducted at the town's observatory.

These examples demonstrate how related information can be organized around separate subjects. The observatory entry describes a physical location, while the archive entry explains the historical information associated with another place.

When writing entry content, include enough information to establish the subject clearly. If an important detail connects two fictional locations, describe that relationship where it is relevant rather than assuming the AI will infer every connection independently.

The objective is to prepare useful contextual information, not to write an entire predetermined conversation. An entry can establish facts about a fictional setting while leaving the participants free to explore different situations within it.

Choosing Keywords for Lorebook Entries

A Lorebook keyword connects recent conversation messages with the information stored in its associated entry. When the keyword occurs within the applicable message window, the entry's content becomes part of the context for the next response.

Consider the words that participants are likely to use when discussing a particular subject. A keyword associated with a fictional location should have a meaningful relationship with that location's description.

For the observatory example, the word "observatory" directly identifies the subject of the entry. Its associated content can then provide details about the building, telescope, and historical research when the conversation concerns that location.

When preparing keywords and content, keep their respective purposes separate:

  • Identify the subject: Choose a recognizable word associated with the fictional location, event, organization, or other background element.
  • Describe the relevant information: Prepare content that explains the subject and its significance within the fictional world.
  • Consider conversation relevance: Think about when the information would be useful during an interaction with the character.

A clear relationship between the keyword and its associated content makes the entry easier to organize and understand when developing the fictional setting.

How the Four-Message Activation Window Works

SpicyChat checks for Lorebook keywords within the last four messages from the user or AI character. When an associated keyword appears within this window, the corresponding entry content is introduced into the context for the next response.

The keyword does not have to appear in a message written by the user. A message generated by the character can also contain a keyword that triggers the associated information.

Consider the following hypothetical conversation involving the observatory entry:

  1. User: Where should we begin our investigation?
  2. Character: The observatory might contain useful records.
  3. User: Can we examine the historical documents?
  4. Character: We should start by identifying the relevant dates.

The word "observatory" appears in the character's first message within this four-message sequence. Under the documented activation mechanism, the content associated with that keyword becomes part of the context for the next generated response.

The example also illustrates why the keyword does not necessarily need to appear in the latest individual message. Its occurrence within the last four messages is the relevant activation condition.

Keep in mind that introducing information into the conversation context does not guarantee a particular generated reply. The entry supplies relevant background information, but the AI may express or incorporate that information in different ways.

How Long Lorebook Context Remains Active

Once activated, a Lorebook entry stays active for approximately two turns. Repeated use of an associated keyword can extend that activation period.

If a conversation continues to focus on the fictional observatory and the participants mention it again, repeated use of the keyword can keep its associated information active for longer.

There are two separate aspects of this mechanism:

  • Activation window: A keyword occurs within the last four messages from either conversation participant.
  • Active duration: An activated entry remains active for about two turns, with repeated keyword use able to extend that period.

The four-message window describes the condition under which information is triggered. The approximate two-turn duration describes how long the activated entry remains active. These values refer to different parts of the mechanism and should not be treated as interchangeable.

When preparing a conversation around recurring subjects, consider how those subjects naturally appear in the dialogue. Repeated references can extend the relevance of associated Lorebook information without establishing a guarantee of permanent AI memory.

Attaching a Lorebook to an Eligible Character

SpicyChat allows one Lorebook to be attached to each eligible character. Lorebook functionality is restricted to Private characters, and public or shared Lorebooks are not currently supported.

Before preparing detailed background information for a character, consider whether its intended visibility is compatible with Lorebook support. If you want to use a Lorebook, Private visibility is the applicable setting.

The attachment limit concerns the Lorebook itself rather than the number of subjects described within it. If your fictional setting includes several locations, organizations, and historical events, you can organize these subjects into separate entries within the character's Lorebook.

For example, the fictional observatory and archive do not need to be treated as separate Lorebooks simply because they describe different places. They can form individual entries within the same collection of background information.

Lorebook Support for Public, Unlisted and Private Characters

Character visibility determines how other users can discover and access an AI character. It also establishes an important eligibility distinction when you intend to attach a Lorebook.

Visibility Public discovery Ordinary user access Lorebook support
Public Included in public listings and search results Accessible through public character discovery Not supported
Unlisted Excluded from public listings and search results Accessible to anyone with the character's link Not supported
Private Excluded from public discovery Creator only; sharing a link does not grant access to other users Supported

Unlisted and Private characters have different access arrangements, even though neither appears in public discovery. An Unlisted character remains accessible through its link, whereas a Private character is accessible only to its creator.

This distinction matters for Lorebook eligibility. Keeping a character outside public search results is not, by itself, sufficient. The supported visibility setting is specifically Private.

If your character concept depends on additional keyword-triggered background information, account for this condition when deciding how the character should be used and who should be able to access it.

Lorebook Information, Tokens and AI Context

The information processed by an AI model is measured in tokens. A token may represent a complete word, part of a word, a symbol, or an emoji. The number of tokens associated with a text therefore does not correspond to a fixed number of words or written characters.

Several elements of character configuration consume tokens, including Personality, Greeting, scenario information, background details or lore, and example dialogue.

Lorebook content is relevant to this distinction because activated information enters the context used for the next response. Preparing contextual information involves deciding which details belong to the character's general configuration and which are associated with particular fictional subjects.

For instance, an astronomer's professional interests and general temperament may belong in the character's personality description. Information about the construction of a particular observatory may be more appropriate as a thematic Lorebook entry associated with that location.

When developing entry content, prioritize details that explain the subject and its relevance to the fictional setting. A focused description can communicate the necessary background without repeating the character's entire personality or unrelated portions of the story world.

The amount of written material in an entry should not be interpreted as an exact token count or a guarantee of how much information will appear in an AI-generated reply.

Lorebook Context Compared With Saved Conversations

SpicyChat saves conversations automatically, and you can view saved chats through the chat menu. This allows you to return to previous interactions with AI characters.

A Lorebook serves a different purpose. Rather than functioning as a record of previous messages, it contains prepared background information associated with keywords that can activate entries during a conversation.

Consider the difference between these two kinds of information:

  • Saved conversations: Previous interactions that remain available through the chat menu.
  • Lorebook entries: Prepared descriptions associated with keywords that introduce relevant information into the context for the next response.
  • Active Lorebook context: Information from an activated entry that remains active for approximately two turns, with repeated keyword use able to extend activation.

A conversation may contain previous discussions about the fictional observatory, while its Lorebook entry contains the background description prepared for that location. The saved conversation records the interaction, whereas the entry provides contextual information when its keyword occurs within the activation window.

Automatic conversation saving should therefore not be interpreted as a guarantee that the AI permanently processes every previous message. Similarly, information stored in a Lorebook does not necessarily remain active throughout an entire conversation.

Frequently Asked Questions About SpicyChat Lorebooks

What triggers a Lorebook entry?

A Lorebook entry is triggered when one of its associated keywords appears within the last four messages from the user or AI character. The corresponding entry content is introduced into the conversation context for the next response.

Can messages from the AI character trigger an entry?

Yes. Keywords can appear in messages from either the user or the character. An occurrence within the last four messages can activate the associated Lorebook content.

How long does a Lorebook entry stay active?

An activated entry remains active for approximately two turns. Repeated use of its associated keyword can extend the activation period.

How many Lorebooks can I attach to one character?

You can attach one Lorebook to each eligible character. Different fictional subjects can be organized into separate keyword-and-content entries within that Lorebook.

Can public characters use Lorebooks?

No. SpicyChat Lorebook functionality is restricted to Private characters. Public and shared Lorebooks are not currently supported, and Unlisted visibility does not meet the Private-character requirement.