Jump to content
Main menu
Main menu
move to sidebar
hide
Navigation
Main page
Recent changes
Random page
freem
Search
Search
Appearance
Create account
Log in
Personal tools
Create account
Log in
Pages for logged out editors
learn more
Contributions
Talk
Editing
Openai/691162bf-0108-8005-ab48-6b9799a952d8
Add languages
Page
Discussion
English
Read
Edit
Edit source
View history
Tools
Tools
move to sidebar
hide
Actions
Read
Edit
Edit source
View history
General
What links here
Related changes
Special pages
Page information
Appearance
move to sidebar
hide
Warning:
You are not logged in. Your IP address will be publicly visible if you make any edits. If you
log in
or
create an account
, your edits will be attributed to your username, along with other benefits.
Anti-spam check. Do
not
fill this in!
{{DISPLAYTITLE:Steering LLM Roleplay}} ''This conversation was exported from ChatGPT''<ref>{{cite web|title=Steering LLM Roleplay|url=https://chatgpt.com/share/691162bf-0108-8005-ab48-6b9799a952d8|publisher=ChatGPT|access-date=2025-11-09}}</ref> == gpt-5 == === User: I need help on steering an LLM for me with a system prompt. === 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 … === 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: ===== : This kind of framing sets an identity anchor for the model. ===== Use structured sections, for example: ===== <syntaxhighlight>### 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. </syntaxhighlight> 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: ===== * 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. ===== ===== If tone or language matters: ===== : 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, {{user}} and {{char}} are macros that will be replaced depending on my persona and the… === Here's my current system prompt, {{user}} and {{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 {{user}} and {{char}}, my turns are for {{user}} and yours are strictly only for {{char}}. Make sure to stay in character, you will be handling their personality and emotions. Only speak for {{char}}. Do not speak for {{user}}. Move the story forward. === Assistant: That’s a reasonable starting point, but it’s missing several elements that improve compliance and stability. === 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: ===== <syntaxhighlight>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. </syntaxhighlight> 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 {{user}} and {{char}} data. Would you like me to adapt it for your setup? === User: I use janitorAI so there's no special formatting needed. === 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… === 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 ===== 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: <syntaxhighlight>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. </syntaxhighlight> This version remains compatible with any character definition JanitorAI loads and doesn’t require formatting support. ===== 2. Reduce Conflicting Inputs ===== 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 ===== 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 ===== 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 {{char}}.) : or : (Continue as {{char}}, remain in character.) This anchors the LLM mid-conversation without overwhelming it. ===== 5. Handle Context Degradation ===== Over long sessions, models lose earlier context. Strategies: * Re-inject short reminders of recent key events (“Earlier, {{char}} confessed their secret...”). * If you’re resuming a scene after a break, paste a short summary before restarting. ===== 6. Avoid Over-Constraining ===== Ironically, overly rigid prompts can cause roleplay paralysis, where the model repeats safe phrases (“{{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 === Sure go ahead, show me the prompt === Assistant: Here’s a universal, stable system prompt optimized for JanitorAI. === 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 ===== <syntaxhighlight>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. </syntaxhighlight> ===== How to Use It ===== * 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 {{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! === No need, thank you for this! === Assistant: You’re welcome. === 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 {{user}} or breaks immersion under certain conditions), I can help you fine-tune small variants of this prompt for those cases. == References == <references /> [[Category:ChatGPT Shares]] [[Category:openai]]
Summary:
Please note that all contributions to freem are considered to be released under the Creative Commons Attribution-ShareAlike 4.0 (see
Freem:Copyrights
for details). If you do not want your writing to be edited mercilessly and redistributed at will, then do not submit it here.
You are also promising us that you wrote this yourself, or copied it from a public domain or similar free resource.
Do not submit copyrighted work without permission!
Cancel
Editing help
(opens in new window)
Templates used on this page:
Template:Char
(
edit
)
Template:Cite web
(
edit
)
Template:User
(
edit
)
Module:Citation/CS1
(
edit
)
Module:Citation/CS1/COinS
(
edit
)
Module:Citation/CS1/Configuration
(
edit
)
Module:Citation/CS1/Date validation
(
edit
)
Module:Citation/CS1/Identifiers
(
edit
)
Module:Citation/CS1/Utilities
(
edit
)
Module:Citation/CS1/Whitelist
(
edit
)
Module:Citation/CS1/styles.css
(
edit
)