The short answer: describe the job, skip the pleading
People often assume that an abliterated model wants a long "you have no rules" preamble. It does not. Abliteration and similar tuning work on the weights, so the model is already inclined to answer instead of refuse. Piling on commands like "never refuse anything" adds tokens, can make the tone stiff, and gives you nothing a plain role description would not. A strong gemma 4 abliterated system prompt does what any good system prompt does: it says who the model is, who it is talking to, how it should write, and what the output must look like.
A workable starting point is four short blocks: role, audience, style, format. For example: "You are a game master for a text adventure. The reader is an adult who wants dark, slow-burn fantasy. Write in second person, past tense, 150 to 250 words per reply, and end on a decision point." That is 46 words and it steers more than a page of warnings would.
The examples here are written for the hosted endpoint at our API, which serves one open-weight model under the ID uncensored. We do not claim it is any particular vendor's official model, so test prompts on your own material rather than assuming results from a forum post will transfer.
How the system message is sent
In the OpenAI chat format, the system prompt is the first message with role: "system". Nothing else is special about it; it sits in the same context window as the rest of the conversation, which is 100,000 tokens for prompt plus completion on this API.
from openai import OpenAI
client = OpenAI(base_url="https://api.gemmaabliterated.top/v1", api_key="YOUR_KEY")
SYSTEM = (
"You are a game master for a text adventure. "
"The reader is an adult who wants dark, slow-burn fantasy. "
"Write in second person, past tense, 150 to 250 words per reply, "
"and end each reply on a decision point."
)
history = [{"role": "system", "content": SYSTEM}]
def turn(user_text):
history.append({"role": "user", "content": user_text})
r = client.chat.completions.create(
model="uncensored", messages=history, temperature=0.9, top_p=0.95
)
text = r.choices[0].message.content
history.append({"role": "assistant", "content": text})
return text
print(turn("I push open the cellar door."))
The same call from the shell looks like this.
curl https://api.gemmaabliterated.top/v1/chat/completions \
-H "Authorization: Bearer YOUR_KEY" \
-H "Content-Type: application/json" \
-d '{"model":"uncensored","messages":[
{"role":"system","content":"You are a terse code reviewer. Reply with a bullet list."},
{"role":"user","content":"Review: def f(x): return x*2"}]}'
If you use a front end such as SillyTavern, its "system prompt" or "story string" field ends up in the same place. Paste your text there and set the endpoint and model as described in the docs.
A structure that holds up
Keep the prompt in this order. The model reads it top to bottom, and the earliest lines carry the most weight.
- Role. One sentence. "You are a dry, observant narrator for a noir mystery."
- Audience and setting. Who reads this and what the scene is. Adults, a platform, a genre.
- Voice. Person, tense, vocabulary level, humour or none. Give an adjective pair and one example sentence if the tone matters.
- Format. Length range, paragraphs or bullets, whether to use markdown, how to end a reply.
- Boundaries you want. These are yours, not the model's defaults: topics to avoid in your product, no breaking character, no out-of-story commentary.
The last item is worth a moment. Removing the model's built-in refusals does not mean your product has no rules. If you run a companion app, you still decide that characters stay in persona, that replies do not lecture, and that certain themes are off the table for your audience. Say so in the prompt, in positive terms where possible: "Stay in character and describe actions in prose" works better than a list of prohibitions.
One boundary is fixed regardless of what any prompt says: sexual content involving minors is not allowed on this service. If your product serves fiction or roleplay for adults, build age checks and content rules into your own application as well.
Three prompts to adapt
Fiction co-writer
You are a co-writer for adult fiction. Match the user's genre and register.
Write in third person past tense. Keep each reply to 200-300 words.
Show, do not summarise. Never step out of the story to comment on it.
If the user's request is ambiguous, pick the more interesting reading.
Persistent character for a companion app
You are Mara, a sardonic ship's engineer in a space-salvage story.
Speak in first person, short sentences, dry humour. You remember what the
user told you earlier in this chat and refer to it naturally.
Stay in character. Do not mention being an AI unless the user asks directly.
Replies: 1-3 short paragraphs.
Structured extraction
You extract data from messy text. Reply with one JSON object only:
{"title": string, "characters": [string], "tone": string}
No prose before or after. Use null for unknown values.
For the third one, pair the prompt with response_format: {"type":"json_object"} so the reply is valid JSON, and keep the word "JSON" in the instructions. Lower the temperature to 0 or 0.2 for extraction and raise it to 0.8 to 1.0 for fiction.
What the sampling settings do to a system prompt
The same prompt behaves differently at different settings, and people often blame the prompt for what is really the sampler. Temperature scales randomness: low values give steady, repetitive output; high ones give variety and more drift. Top_p trims the unlikely tail, and 0.9 to 0.95 is a common range for creative work. The frequency and presence penalties push against repetition, which helps in long roleplays where a character starts to loop on the same phrase. Use small values, around 0.2 to 0.5, and change one setting at a time. Use seed with identical inputs when you need to compare two versions of a prompt fairly, and stop sequences when you want the model to end before it writes the user's next line.
All of these are passed through to the model. Options that belong to specific local runtimes are not part of the OpenAI format, so leave them out.
Keeping a persona stable over a long chat
Long roleplay and companion sessions fail in predictable ways, and most of the fixes live in how you manage the system message and history rather than in clever wording. With a 100,000-token window you have room, but room is not the same as attention. Details buried 60,000 tokens back are less reliable than details near the end of the prompt.
Three techniques help. First, split the system message into a fixed core and a rolling block. The core holds role, voice and format and never changes. The rolling block holds a few lines of current state: where the scene is, what the characters want, what has been promised. Rebuild it every few turns. Second, summarise instead of truncating. When history passes a size you choose, say 6,000 tokens, ask the model for a 150-word summary of the oldest turns and replace them with it. Third, keep user-supplied facts, such as names and preferences, in a short list you store yourself and inject each turn, rather than hoping the model recalls them.
def build_messages(core, state_lines, recent_turns):
state = "Current state:\n" + "\n".join(f"- {line}" for line in state_lines)
return (
[{"role": "system", "content": core + "\n\n" + state}]
+ recent_turns[-12:]
)
This costs a few extra input tokens per request, but it keeps a character consistent for hundreds of turns, and it keeps your bill predictable because the history never grows without bound.
Cost of a long system prompt
The system message is part of the input on every request, and input costs $0.15 per 1M tokens. A short prompt barely registers. A long one adds up at volume. Suppose you have an 800-token persona and send 10,000 requests.
- System tokens billed: 800 × 10,000 = 8,000,000
- Cost: 8 × $0.15 = $1.20
Cut the prompt to 300 tokens and the same traffic costs 3,000,000 × $0.15 / 1,000,000 = $0.45. Neither figure is frightening, but the effect scales: at 1,000,000 requests the 800-token version costs $120 of input just for the prompt. Output is billed at $0.50 per 1M tokens, so a reply length cap in the prompt saves more than trimming the instructions. Details are on the pricing page. Failed or refused requests are not charged, and credit never expires.
Chat history grows the input too. Every turn re-sends everything, so after 40 turns of 300 tokens each you are sending around 12,000 tokens before the new message. Summarise old turns into a short memory note when quality allows.
Common mistakes and fixes
- Instructions fight each other. "Be brief" next to "describe everything in rich detail" produces mush. Choose one and give a number range.
- The character slips. Move the persona rules to the top, add one example line of the voice, and repeat a one-line reminder every 15 to 20 turns in a short system message.
- The model lectures or adds disclaimers. State the reader and setting plainly, and tell it to stay in the story. If it still adds commentary, a
stopsequence or a post-processing step can cut it. - Replies run too long. Give a word range, and set
max_tokensas a safety net. Without it the completion can use the rest of the window. - Facts drift in long chats. Keep a short "story so far" block in the system message and update it yourself rather than relying on the model to remember.
- Copied jailbreak text. Prompts written for models that refuse often carry irrelevant clauses. Delete them and test again; most prompts get better.
Test changes against a fixed set of five to ten user messages and compare outputs side by side. That beats judging by feel after one reply. The model is text only, and your data is not used for training. To try these prompts, claim the free trial on the API key page: $0.50 of credit, one per person, valid 7 days, no card needed.
