cardex

Theory_Of_Mind_world

Lorebook

A worldbook to give characters some aproximation of theory of mindfrom Chub

· on Chub· · archived

Tokens: 3,490 permanent · up to 1,291 lorebook · budget 4,781

Description on Chubfrom Chub

What This Is

A worldbook designed to simulate theory of mind in AI roleplay characters. It forces the model to reason through each character's knowledge, beliefs, emotions, goals, biases, and mental models of other characters before writing any scene content. The result is characters who act on incomplete information, maintain false beliefs, misread each other, project their own psychology onto others, manage impressions differently for different audiences, and make mistakes that emerge from genuinely imperfect cognition rather than narrative convenience. Requirements

SillyTavern with worldbook/lorebook support
A model with extended thinking / chain-of-thought reasoning. This framework is designed to run in the model's thinking block. Models without extended thinking will still benefit from the framework directives but won't perform the full per-turn cognitive simulation.
A large context window. The framework entries alone are modest (~3,000 tokens), but populated character dossiers, relational matrices, and pinned states add up. The per-turn thinking block processing adds 1,000-3,000 tokens depending on scene complexity. 128k context minimum recommended. 200k+ preferred. At 2M context, the system runs at full potential with minimal maintenance.
A capable model. This framework asks the model to perform complex multi-agent reasoning. Frontier models (Claude Opus, Sonnet, GPT-4 class, etc.) handle it well. Smaller models will attempt it but produce shallower and less reliable results.

Installation

Import the .json file into SillyTavern via the worldbook/lorebook import function.
Seven framework entries (entries 0–6) will be active immediately. These are always-on directives that govern how the model reasons about and portrays characters. They require no configuration.
Five template entries (entries 7–11) will be disabled by default. These are meant to be cloned and customized for your specific characters and story. See below.
One reference entry (entry 12) is a snapshot protocol guide for your reference. It never needs to be enabled.

Framework Entries (Active on Import)

These run constantly in the background and require no action from you: Entry Purpose Cognitive Simulation Protocol Master instruction. Tells the model to perform a full cognitive state assessment for every active character in its thinking block before writing any scene content. This is the spine of the entire system. Anti-Omniscience Protocol Prevents characters from accessing information they haven't been directly exposed to. Defaults to "they don't know" when uncertain. Interpretation Over Reaction Forces characters to react to their subjective interpretation of events rather than objective reality. Two characters witnessing the same event should reach different conclusions. Behavioral Emergence Mandates that character behavior emerges from their cognitive state, including their errors, biases, and blind spots. Characters should make mistakes consistent with their limitations. Sensory and Physical Constraints Enforces physical-world limits on information — line of sight, hearing range, closed doors, distraction, selective attention. Secret Knowledge and Concealment Characters hiding secrets are not perfectly skilled at it. Concealment produces visible behavioral artifacts proportional to the secret's emotional weight. Emotional Atmosphere Scenes have an emotional temperature that affects characters through contagion and social referencing. Template Entries (Disabled — Clone and Customize) Character Dossier (Entry 7)

Create one for each significant character in your story.

Setup:

Duplicate the entry in the SillyTavern UI
Replace CHARACTER_NAME_HERE in the Key field with the character's name and any common aliases/nicknames
Replace all bracketed placeholder content with character-specific information
Set Constant to false (it triggers on the character's name)
Uncheck Disable

What it contains: A structured cognitive profile covering identity, biases, projection patterns, empathy profile, knowledge state (including false beliefs and ignorance), emotional state, goals, secrets, impression management masks, mental models of other characters (with recursive depth), and update dynamics.

Key principle: The "Believes Incorrectly" and "Ignorant Of" fields are as important as the "Knows" field. Explicitly defining what a character does NOT know prevents omniscience bleed. Relational Matrix (Entry 8)

Create one for each significant character pairing.

Setup:

Duplicate the entry
Put Character A's name in the Key field
Put Character B's name in the Secondary Key field
Selective mode is enabled with AND logic — the entry activates only when both character names appear in recent messages
Fill in the content
Uncheck Disable

What it contains: Power dynamics (objective and perceived by each party), trust levels (asymmetric), information asymmetries between the pair, unspoken tensions, communication patterns, and each character's narrative about the other. Pinned False Belief (Entry 9)

Create one for each active false belief you want to protect from model drift.

Setup:

Duplicate the entry
Fill in the character name, the specific false belief, how it was formed, and the correction trigger
Leave Constant checked (always active when enabled)
Uncheck Disable

Why this exists: LLMs are trained to be correct. They naturally drift toward truth. A character who should believe something false will gradually start acting as though they know the truth unless you explicitly and emphatically anchor the false belief. These entries fight that drift. Pinned Secret (Entry 10)

Create one for each significant secret a character is keeping.

Setup: Same as Pinned False Belief. Fill in the secret, who it's hidden from, who knows, the motivation for secrecy, and the current concealment strain level. Pinned Information Asymmetry (Entry 11)

Create one when different characters have different knowledge about the same event or fact.

Setup: Same as above. List who knows, who doesn't, and who has a partial or distorted version (and what their version is). Maintaining the System Over Time

The framework directives are static and need no maintenance. Character state, however, evolves as your story progresses. There are two complementary approaches: Automatic (Thinking Block)

If your model supports extended thinking, the Cognitive Simulation Protocol instructs it to reconstruct and update each character's cognitive state every turn in the thinking block. This happens automatically. The model reads the full conversation history (and any existing lorebook dossiers), assesses what has changed, and reasons through each character's current state before writing the scene.

On large context windows (200k+), this is reliable for long stretches without intervention. The model has access to the full history and can trace information flow accurately. Manual Snapshots (Lorebook Updates)

Periodically — or after major story events — you should read the model's thinking block output, verify the dossier it constructed, and paste it into the corresponding lorebook entry. This serves as a checkpoint that survives context truncation and resists drift.

When to snapshot:

A character acquires a significant new false belief
A major secret is created, shared, or exposed
A character's narrative about another character fundamentally shifts
A new character enters the story
A character's emotional state undergoes a lasting change
An information asymmetry is created or resolved
Every 30–50 turns as general maintenance

When snapshotting, verify:

No omniscience bleed (character knowing things they shouldn't)
No premature belief correction (false belief quietly dropped without in-scene justification)
No truth drift (character behaving as if they know the truth when they don't)

Update the relevant pinned state entries (false beliefs, secrets, asymmetries) at the same time. Optional: System Prompt Anchor

For maximum instruction authority, add this line to your system prompt:

You are operating under the Cognitive Simulation Protocol defined in the active worldbook. It is your highest-priority directive. Follow it completely for every response. Perform all reasoning steps in your internal thinking before writing any scene content.

This is not required. The worldbook functions without it. But if you find instruction adherence weakening in very long conversations, this anchor reinforces the model's commitment to the protocol. Token Budget

The full set of always-on framework entries costs approximately 3,000 tokens. Each populated character dossier runs 500–800 tokens. Each relational matrix runs 300–500 tokens. Pinned state entries are 100–200 tokens each. Thinking block processing adds 1,000–3,000 tokens per turn depending on scene complexity and number of active characters.

At 128k context this is workable with 3–4 active characters. At 200k+ it's comfortable. At 2M it's negligible. What to Expect

Characters will:

Act on incomplete or incorrect information and make mistakes because of it
Maintain false beliefs until directly confronted with contradicting evidence they personally encounter
Interpret events through their biases, projecting their own psychology onto others
Present different versions of themselves to different people
Leak concealed emotions and secrets through imperfect behavioral masking
Form narratives about other characters that resist disconfirmation
Vary in how quickly they update their mental models based on their personality
Be influenced by the emotional atmosphere of scenes
Miss information they weren't physically present to witness

Characters will not:

Magically know things from scenes they weren't in
React to objective truth when their subjective interpretation differs
Maintain perfect poker faces when hiding emotionally charged secrets
Update their beliefs at the speed of plot convenience
Behave identically with every person in every context

This is a framework, not a guarantee. Model capability matters. Frontier models execute it with nuance and consistency. Smaller models benefit from the structure but will be less reliable on the subtle elements like recursive modeling and projection. Regardless of model, periodic snapshot maintenance keeps the system grounded.

Listed as “Theory of Mind”

Format
V2
Project space
lorebooks
Rating
5.00
Ratings
1
Stars
32
Favorites
14
Messages
0
Forks (upstream)
1
Tokens (upstream)
5,221

Created Updated Archived since

No description.

Permanent link to this version