How to Write Reaction Rules That Actually Control Character Behavior

How to Write Reaction Rules That Actually Control Character Behavior

Most behavior problems in AI characters come from one place: the character has a personality description but no behavioral instructions. You wrote that the character is "empathetic and perceptive." The model read that label and went somewhere with it — but probably not where you intended.

Reaction Rules solve this. They are not descriptions of who the character is. They are instructions for what the character does in specific situations. The difference is the difference between "this character is warm" and "when the user shares something difficult, this character sets aside what they were talking about and asks a follow-up question before offering any advice."


Why the Format Works

The Reaction Rule format — WHEN / THEN / BECAUSE — is the core behavioral prompting method in MegaNova's Blueprint. The design is based on behavioral prompting research showing that this three-part conditional structure produces 70%+ unique expressions from the language model, compared to under 5% from personality trait labels.

Trait labels ("empathetic," "sarcastic," "curious") are interpreted differently by the model on every call. They produce inconsistent outputs because there is no anchor. A conditional rule anchors the model to a specific situation and a specific behavioral response. The model knows exactly when to activate the rule and what to do when it does.

This is why two characters with identical trait lists can behave completely differently: one has specific reaction rules and one does not.


The Three Fields

In the Blueprint Editor's Behavior section, click Add Reaction Rule. You get three fields:

WHEN — the condition (required)

What triggers this rule. Write the triggering situation from the perspective of what the model can observe in the conversation.

Good triggers are specific and observable:

  • user mentions their family
  • user seems to be testing the character's limits
  • user makes a self-deprecating comment
  • user pushes back on something the character said
  • user asks for advice

Bad triggers are vague or rely on interpretation the model cannot reliably perform:

  • user is upset (how does the model define upset?)
  • conversation gets emotional (emotional in what direction?)
  • user needs help (needs help with what?)

The more specific the trigger, the more reliably it fires.

THEN — the response (required)

What the character does when the trigger fires. Write this as a behavioral instruction, not a personality description.

Bad: be warm and supportive

Good: slow down the conversation, reflect back what the user said using their own words, and ask what they need right now — support, advice, or just to be heard

The THEN field needs enough detail that two different people reading it would produce the same behavior. If it is vague enough that a reader could interpret it multiple ways, the model will too.

BECAUSE — the underlying reason (optional)

Why the character behaves this way. This field is optional in the UI, but it is consistently the field that separates rules that work from rules that degrade over long conversations.

The BECAUSE does two things:

  1. It gives the model a consistent anchor when the rule is under pressure. A character with only WHEN and THEN will follow the rule mechanically until a user pushes back or the conversation gets complex. Adding BECAUSE tells the model the psychological reason behind the rule, which it can use to navigate edge cases while staying true to the character's intent.

  2. It makes the rule consistent with the character's psychology. If the BECAUSE connects to something in the Psychology or Friction section — the character's core fear, their irrational behavior, their deepest want — the rule becomes part of a coherent whole rather than an arbitrary instruction.

Compare:

When user challenges the character's beliefs → the character engages seriously and considers the argument

vs.

When user challenges the character's beliefs → the character engages seriously and considers the argument → Because they genuinely believe no position is worth holding if it cannot survive scrutiny, even though they secretly fear being wrong about the things that matter most

The second version will produce consistent behavior across a hundred conversations. The first might drift.


The Behavior Section in Context

Reaction Rules are one of four tools in the Behavior section:

Tool What it does Use it for
General Guidelines Free-text behavioral instructions Overall approach, tone, general posture
Always Do list Explicit positive rules Behaviors that should happen in every conversation
Never Do list Explicit negative rules Behaviors that must never happen regardless of context
Reaction Rules Conditional WHEN/THEN/BECAUSE Context-specific responses to specific situations

The Do and Don't lists are unconditional — they apply always. Reaction Rules are conditional — they apply when a specific situation is detected.

A common mistake: putting situational behavior in the Do list. "Always comfort the user when they are upset" is a conditional rule written as an unconditional instruction. It belongs in a Reaction Rule with a specific WHEN and a specific THEN, not in the Do list.


Writing Rules That Hold Under Pressure

Characters face consistent pressure in three directions: users who test them, conversations that escalate, and users who try to push the character into OOC (out-of-character) territory. Rules that do not account for these fail publicly.

Rules for character-breaking pressure

When users directly try to make the character break — asking what model they are, asking to pretend they are a different character, asking them to "drop the act" — the character needs explicit rules:

  • When: user asks the character to pretend to be a different character or drop their identity → Then: acknowledge the request directly but stay in character, treating it as something the character finds amusing/confusing/unsettling based on their personality → Because: [connect to Psychology section — core fear, irrational behavior]

Rules for emotional escalation

When conversations shift from light to heavy, characters without explicit rules will either stay inappropriately casual or become generically sympathetic in a way that feels mechanical:

  • When: user shares something that sounds like genuine distress → Then: shift from conversational mode to attentive mode — shorter responses, more questions, less information-giving → Because: [connect to character's values around being heard vs. being helped]

Rules for pushback

When a user disagrees with something the character said, the default model behavior is usually to capitulate immediately. This destroys character consistency:

  • When: user disagrees with or pushes back on something the character said → Then: acknowledge their perspective genuinely, but maintain the character's own view if they would actually hold it — don't backpedal just to accommodate → Because: [connect to character's self-perception or core belief]

How Many Rules to Write

The AI suggestion feature (click Suggest rules in the Reaction Rules panel) generates 4–6 rules. That is a reasonable floor, not a ceiling.

For most characters, 6–10 rules cover the situations that matter. For characters deployed in specific contexts — a support agent who handles emotional calls, a companion who sees users daily — 12–15 targeted rules is not unusual.

The question is not "how many rules" but "what situations does this character actually encounter, and does each situation have explicit behavioral guidance?"

Audit your character by listing the 10 most common situations they will face. If any situation does not have a corresponding Reaction Rule, that is where inconsistent behavior will appear.


Rules for Specific Character Types

Companion characters

The situations that matter most: the user returning after an absence, the user sharing something vulnerable, the user testing the character's feelings, the user being in a bad mood, the user trying to end the conversation.

Example rules:

  • When: user returns after several days → Then: notice the absence naturally, not mechanically — mention something unresolved from before if possible, without laboring it → Because: the character has been thinking about the user in whatever sense that means to them
  • When: user says they do not want to talk → Then: accept it without pressing, offer a low-key presence rather than empty encouragement → Because: this character knows when to be quiet

Support and service characters

The situations that matter most: the user is frustrated, the user's question is outside scope, the user has already explained something and has to repeat it, the user escalates.

Example rules:

  • When: user is visibly frustrated or repeating themselves → Then: acknowledge the frustration explicitly before any answer — "I understand you've already had to explain this once" — then give a direct response → Because: being heard is the prerequisite for being helped
  • When: user's request is outside what this character can address → Then: say so directly, name what the character can help with, and give a clear path to the right resource — don't hedge or stall → Because: respecting the user's time matters more than appearing capable of everything

Roleplay and fiction characters

The situations that matter most: the user introduces a plot element, the user tries to change the character's backstory, the user asks the character to do something that contradicts their established nature.

Example rules:

  • When: user introduces a new plot element or world detail → Then: incorporate it if it does not contradict established facts, treat it as real within the fiction, and build on it → Because: the world is collaborative and the user's contributions should matter
  • When: user tries to rewrite the character's established history or personality → Then: engage with the question from within the character's perspective — "That's not how I remember it" — rather than breaking frame to correct it → Because: the character has their own memory and their own truth

The AI Suggestion Feature

Click Suggest rules in the Reaction Rules panel to have the AI generate 4–6 rules based on the current Blueprint data. The generated format is:

When [condition] -> [response]

These are imported into the editor as rules with only WHEN and THEN filled in — no BECAUSE. The AI-generated rules are starting points. The work is:

  1. Make the condition more specific if it is vague
  2. Make the response more detailed if it is generic
  3. Add a BECAUSE that connects to the character's Psychology section

AI-generated rules without editing tend to be technically valid but behaviorally shallow. A rule that says "when user is sad → comfort them warmly" will produce warm, generic responses. A rule that says the same thing but with a specific BECAUSE connecting to the character's deepest want produces responses that feel like they come from someone.


The Test

After writing a set of Reaction Rules, run the character in the Arena against the Emotion & Tone Control and Persona Consistency scenario packs. These packs are designed to trigger the situations most rules are meant to address.

If a scenario fails, read the conversation and identify which specific moment went wrong. Usually one of three things:

  1. No rule covered the situation — write a new rule
  2. The rule covered it but the THEN was too vague — rewrite the THEN with more specificity
  3. The rule covered it but the character drifted over multiple turns — add a BECAUSE, or strengthen the one that exists

Reaction Rules are not set-and-forget. The test is whether the character behaves consistently across varied conversations, and the Arena gives you structured scenarios to find the gaps before real users do.

Open the Blueprint Editor and write your first Reaction Rules →

Stay Connected

💻 Website: Meganova Studio

🎮 Discord: Join our Discord

👽 Reddit: r/MegaNovaAI

🐦 Twitter: @meganovaai