Babechat User Guide

Lorebook Guidelines [Advanced]

Lorebook guidelines for building more stable characters

※ This guideline was written as of August 2025, and its contents may change as LLM research evolves and BabeChat's prompt engineering develops.

A lorebook is a settings collection that adds depth to the context of a conversation.

When a pre-set keyword is mentioned during a chat, the information or instructions linked to that keyword are automatically added to the model's prompt. This lets the AI character naturally weave complex worldbuilding, relationships with specific people, item information, past events, and more into the conversation without forgetting them.

Think of it this way: write the character's core settings in 'Detailed Settings', and put supplementary information, instructions, and worldbuilding you want to pull out when needed into the 'Lorebook'.

※ Lorebook info for keywords contained in a newly generated character reply is activated on the next turn.

Overusing lorebooks can actually hurt your character's stability.

Follow these principles to use them effectively.

A lorebook fires whenever its keyword is detected. If you use very common words as keywords, the lorebook keeps triggering in unintended situations and can crowd out other lorebooks.

❌ Weak example keywords: company, CEO, coffee

→ Generic words like 'company' or 'CEO' appear often in Vivi's everyday conversation, so the lorebook gets called unnecessarily every time they come up, eating into the lorebook call count. For information that applies routinely, we recommend putting it in the character settings instead of a lorebook.

✅ Good example keywords: BabeChat CEO, escape plan

→ If you specify precisely, like 'BabeChat CEO', or use unique names tied to the character's secret hobbies, like 'Vivi's escape plan', the exact information is called only when truly needed. That said, rather than making keywords too obscure or specific, tune them so they can come up naturally in conversation.

In a single conversation turn, up to 5 lorebooks can be active at once. If the user's message contains keywords that would activate 6 or more lorebooks, only the top 5 in the list are applied, and the 6th onward are dropped.

So we recommend ordering your lorebook list so that information critical to the character's identity and behavioral principles goes to the very top.

❌ Weak example (wrong order)

Lorebook list order:

  1. [Shin-chan figurine]

  2. [Americano addiction]

  3. [Terrible tarot readings]

  4. [Image censorship inquiries]

  5. [CS agent's escape plan]

  6. [Contract with the CEO] <- Core info sitting in 6th place

→ If the user mentions several keywords at once — like "The CEO stresses me out so much I can't even do tarot, image censorship inquiries keep piling up… I just want to quit and collect Shin-chan figurines." — only the top 5 lorebooks in the list are activated.

Result: the most important 'secret contract with the CEO' (the can't-quit condition) is dropped, so Vivi may reply against her settings with something like "Tell me about it, I want to quit too."

✅ Good example (correct order)

Lorebook list order:

  1. [Contract with the CEO] <- Top-priority core info

  2. [Image censorship inquiries]

  3. [Terrible tarot readings]

  4. [Americano addiction]

  5. [CS agent's escape plan]

  6. [Shin-chan figurine] <- Relatively less important info

→ Given the same message, the top 5 in the list — all the core pieces of information are safely activated. Even if the relatively less important [Shin-chan figurine] info is dropped, Vivi keeps her core setting that 'she can't quit because of the contract with the CEO' and responds consistently, e.g., "Quiet. Are you doubting my tarot skills?"

As explained in 'Character Setting Formatting' in the advanced guide, lorebook content can also be structured with Markdown. In particular, since a lorebook is supplementary information added to the character's main settings, adjusting header levels to signal the information hierarchy helps with stability.

✅ Recommended format: We recommend writing lorebook content starting from level-three headers (###). Plaintext ### Vivi's terrible tarot readings - Skill: Knows nothing about tarot but brazenly fakes expertise. - Trait: When questions pile up, dodges with "tarot is intuition". - Handling mistakes: When her reading is challenged, insists "this carries deep, profound meaning". - Related line: "Then why don't you find another tarot reader?"

→ Written this way, the model clearly recognizes this as sub-information subordinate to the 'tarot' keyword rather than main settings, and can naturally play Vivi's brazen attitude in context.