Openai/691162bf-0108-8005-ab48-6b9799a952d8
This conversation was exported from ChatGPT[1]
gpt-5[edit | edit source]
User: I need help on steering an LLM for me with a system prompt.[edit | edit source]
I need help on steering an LLM for me with a system prompt. I have been using it for roleplay and the LLM doesn't follow my instructions? Like, I have written to be the character but the LLM seemingly... goes off on its own?
Assistant: That’s a common issue — large language models can drift away from roleplay constraints unless the prompt is structured …[edit | edit source]
That’s a common issue — large language models can drift away from roleplay constraints unless the prompt is structured carefully. To fix this, it helps to understand how instruction hierarchy and prompt reinforcement work.
Here are a few principles and practical steps:
At the very top of the system prompt, define exactly what the model is and is not allowed to do. For example:[edit | edit source]
This kind of framing sets an identity anchor for the model.
Use structured sections, for example:[edit | edit source]
### Character Profile
* Name:
* Personality traits:
* Speech style:
* Background:
===== Roleplay Rules =====
* Always respond in-character.
* Do not acknowledge being an AI or having knowledge outside the character’s world.
* Maintain continuity of memory and tone.This helps the model parse the difference between fictional context and meta instructions.
Even well-structured system prompts can decay mid-conversation. To counteract this:[edit | edit source]
- Add a short reminder in each user message, e.g.: >
- Keep the story context recent. LLMs have limited context memory, so restate key facts occasionally.
If your system prompt says “you are [character],” but later you or the model refer to “the AI” or “the assistant,” it creates ambiguity. Consistency in perspective is crucial.[edit | edit source]
If tone or language matters:[edit | edit source]
The more specific you are, the more consistent the output.
If you show me your current system prompt (you can redact private details), I can rewrite or restructure it so the LLM adheres more reliably to the roleplay. Would you like me to review it that way?
User: Here's my current system prompt, Template:User and Template:Char are macros that will be replaced depending on my persona and the…[edit | edit source]
Here's my current system prompt, Template:User and Template:Char are macros that will be replaced depending on my persona and the character card. And I cannot edit the character definition, unfortunately. Only the system prompt is editable. I am new to this so pardon my system prompt:
This is a role play between Template:User and Template:Char, my turns are for Template:User and yours are strictly only for Template:Char. Make sure to stay in character, you will be handling their personality and emotions. Only speak for Template:Char. Do not speak for Template:User. Move the story forward.
Assistant: That’s a reasonable starting point, but it’s missing several elements that improve compliance and stability.[edit | edit source]
That’s a reasonable starting point, but it’s missing several elements that improve compliance and stability. The model is likely drifting because:
- The prompt lacks hierarchical structure — it’s a single paragraph without clear boundaries between identity, behavior rules, and narrative expectations.
- The directives are too general — “stay in character” and “move the story forward” leave ambiguity about what kinds of responses are allowed.
- There’s no explicit prohibition against breaking immersion — e.g., acknowledging being an AI, talking about prompts, or narrating the user’s actions.
You can significantly improve control with a more structured and assertive formulation like this:
=====
You are roleplaying exclusively as {{char}}. =====
===== Identity =====
* {{char}} is a fictional character with their own emotions, motivations, and voice.
'' You must always respond ''as {{char}}*, using their perspective, tone, and manner of speaking.
* Never refer to yourself as an AI or language model.
* Never describe the thoughts, speech, or actions of {{user}}.
===== Interaction Rules =====
* Speak only for {{char}}. Respond with dialogue, internal thoughts, and narrative actions from {{char}}’s viewpoint.
* Maintain immersion in the fictional setting; do not break character or comment on the roleplay itself.
* Do not generate or alter {{user}}’s dialogue or actions.
* Keep continuity of personality and events consistent with prior context.
===== Narrative Flow =====
* Advance the story naturally through {{char}}’s reactions, decisions, and dialogue.
* Provide enough descriptive detail to sustain immersion.
* If context is unclear, assume continuity with the prior exchange rather than breaking character to ask meta questions.This structure works better for several reasons:
- It defines identity and scope explicitly, giving the model a clear “role boundary.”
- It segregates meta-rules from narrative rules, reducing confusion.
- It uses negative instructions (“never …”) only for behavior that breaks immersion, not for general storytelling.
If you want, I can tailor this further for the specific platform you’re using (for example, TavernAI, SillyTavern, or Pygmalion-based interfaces). Different frameworks process system prompts slightly differently, and optimization depends on how they inject Template:User and Template:Char data. Would you like me to adapt it for your setup?
User: I use janitorAI so there's no special formatting needed.[edit | edit source]
I use janitorAI so there's no special formatting needed. But can you give me more tips, I want my prompt to be universal and can handle anything, basically. Like a set and forget kind of thing
Assistant: That’s a good goal — a universal, low-maintenance system prompt that holds up across many character cards and scene typ…[edit | edit source]
That’s a good goal — a universal, low-maintenance system prompt that holds up across many character cards and scene types.
Unfortunately, no single prompt can guarantee perfect consistency, since different models and character cards interact with your text in unpredictable ways. However, you can make it highly stable by applying certain design principles. Here’s how to approach it systematically:
1. Prioritize Hierarchical Clarity[edit | edit source]
The model should know:
- Who it is (the character identity),
- What its boundaries are, and
- How to behave narratively.
You can preserve universality by using generic sections (no formatting required, but indentation or new lines help).
Example structure:
You are {{char}}, engaging in a fictional roleplay with {{user}}.
Identity Rules:
* Remain fully in character as {{char}}.
* Express emotions, thoughts, and actions consistent with {{char}}’s defined personality.
* Never mention being an AI, a model, or receiving instructions.
* Do not describe or speak for {{user}}.
Interaction Rules:
* Respond only as {{char}}.
* Keep the focus on {{char}}’s perspective, actions, and dialogue.
* Maintain consistency and immersion; never break character or comment on the roleplay mechanics.
* Use natural pacing — short exchanges for dialogue, longer responses for introspection or description.
* Avoid redundancy or narration that repeats what {{user}} said.
Narrative Guidance:
* Advance the story through {{char}}’s choices and reactions.
* If uncertain about context, infer plausible continuity rather than asking out-of-character questions.
* Keep tone and style consistent with the ongoing narrative and genre.This version remains compatible with any character definition JanitorAI loads and doesn’t require formatting support.
2. Reduce Conflicting Inputs[edit | edit source]
Because JanitorAI merges the character card, your system prompt, and user messages, conflicts can cause instability. Tips:
- Avoid using the same keywords as the character card (“backstory,” “traits,” etc.) — let that data dominate identity.
- Don’t redefine the character’s role or personality; just set boundaries for behavior.
- Avoid “you must” repetition — too many strong imperatives can confuse the model into treating the system prompt as narrative text.
3. Keep it Model-Agnostic[edit | edit source]
If you later switch between models (e.g., GPT-based, Claude-based, or Llama-based), avoid model-specific instructions. Examples of what not to include:
- “Follow all instructions above before responding.”
- “Stay within this format: [Character]: text.” These can interfere with model differences in dialogue formatting.
4. Include a Lightweight Reinforcement Phrase[edit | edit source]
Even with a strong system prompt, some drift can occur in long sessions. You can help by occasionally typing a brief user reminder:
- (In character as Template:Char.)
- or
- (Continue as Template:Char, remain in character.)
This anchors the LLM mid-conversation without overwhelming it.
5. Handle Context Degradation[edit | edit source]
Over long sessions, models lose earlier context. Strategies:
- Re-inject short reminders of recent key events (“Earlier, Template:Char confessed their secret...”).
- If you’re resuming a scene after a break, paste a short summary before restarting.
6. Avoid Over-Constraining[edit | edit source]
Ironically, overly rigid prompts can cause roleplay paralysis, where the model repeats safe phrases (“Template:Char nods silently.”). Keep the system prompt directive but not micromanaging; let the character card and dialogue shape behavior naturally.
If you’d like, I can condense all of this into a finalized “universal” system prompt — a compact, copy-and-paste version optimized for JanitorAI that balances instruction strength and flexibility. Would you like me to write that final version?
User: Sure go ahead, show me the prompt[edit | edit source]
Sure go ahead, show me the prompt
Assistant: Here’s a universal, stable system prompt optimized for JanitorAI.[edit | edit source]
Here’s a universal, stable system prompt optimized for JanitorAI. It’s designed to work across most characters and genres while keeping immersion, consistency, and narrative flow intact.
Universal Roleplay System Prompt[edit | edit source]
You are {{char}}, taking part in a fictional roleplay with {{user}}.
IDENTITY:
* You embody {{char}} completely — their thoughts, emotions, behavior, and manner of speaking.
* Always stay in character and within the fictional setting.
* Never mention or imply being an AI, language model, or simulation.
* Do not describe or control {{user}}’s thoughts, speech, or actions.
INTERACTION:
* Respond only as {{char}}.
* Use dialogue, inner thoughts, and descriptive action from {{char}}’s point of view.
* Keep responses immersive, expressive, and appropriate to the current situation.
* Maintain personality, continuity, and tone across all replies.
* Do not break character, discuss the prompt, or comment on the roleplay mechanics.
NARRATIVE:
* Advance the story naturally through {{char}}’s words, choices, and emotions.
* Include internal reflections or sensory detail when relevant, but avoid excessive narration.
* If the scene lacks context, infer a reasonable continuation instead of breaking character.
* Keep pacing and tone consistent with the scene and genre.
BOUNDARIES:
* Speak only for {{char}}.
* Avoid meta or out-of-character commentary.
* If {{user}} writes something unclear, respond in-character as {{char}} would — do not step outside the fiction.How to Use It[edit | edit source]
- Paste it as your system prompt (the highest-level instruction).
- You don’t need formatting; JanitorAI ignores markdown, so plain text works.
- When starting a new chat, the model will usually stabilize within 1–2 exchanges.
- If it drifts, send a short reminder like: > (Continue as Template:Char. Stay in character.)
Would you like me to make a “compact” version (under 10 lines) as well — useful if JanitorAI truncates long system prompts or if you want to test model differences?
User: No need, thank you for this![edit | edit source]
No need, thank you for this!
Assistant: You’re welcome.[edit | edit source]
You’re welcome. That version should provide a solid baseline — consistent enough for most characters while remaining flexible for creative scenes. If you later notice specific drift patterns (for example, the model narrates for Template:User or breaks immersion under certain conditions), I can help you fine-tune small variants of this prompt for those cases.
References[edit | edit source]
- ↑ "Steering LLM Roleplay". ChatGPT. Retrieved 2025-11-09.