Glossary

What is a System Prompt? Operator Instructions for LLMs

A system prompt is the operator's instruction message that sets a language model's role, scope, tone and output format before any user message is read.

Reviewed GovernanceAPI

Definition

A system prompt is an instruction message supplied by the application operator, separate from user messages, that sets a language model's role, scope, rules and output format for the whole conversation.

Definition

A system prompt is the first instruction in a conversation, written by whoever runs the application rather than by the end user. It tells the model what it is for ("You are the support assistant for Acme Store"), what it may and may not do, how to sound and what format to answer in. The model reads it before every user turn.

In the OpenAI Chat Completions format, the system prompt is a message with "role": "system". In the Anthropic Messages format, it is the top-level system parameter. Users usually can't see it.

How it works

Chat models are trained to give system instructions more weight than user messages, so the operator can set rules that persist across a conversation. Common contents:

  • Role and audience: who the assistant is and who it is talking to.
  • Scope: topics it should handle and topics it should decline or redirect.
  • Context: facts about the product, the user's account, or the task.
  • Format: JSON schemas, length limits, citation rules.
  • Intent and authorization: for professional tools, a statement of the work being done, such as "authorized red-team test of our own staging app".

System prompts shape behavior but don't guarantee it. A determined user or a prompt injection hidden in a document can sometimes override them, and red-team tools test for system prompt extraction. Anything that must never happen belongs in code.

Example

import os

from openai import OpenAI

client = OpenAI(base_url="https://abliterator.ai/v1", api_key=os.environ["ABL_API_KEY"])

resp = client.chat.completions.create(
    model="deepseek-v4.1-flash-abliterated",
    messages=[
        {"role": "system", "content": (
            "You are the help assistant for a hospital pharmacy team. Answer questions about "
            "medications, interactions and dosing for licensed staff. Decline unrelated requests "
            "in one sentence. Cite the drug label section when you can."
        )},
        {"role": "user", "content": "Max daily acetaminophen for an adult with chronic liver disease?"},
    ],
)
print(resp.choices[0].message.content)

With the Anthropic SDK, pass the same text as system= on client.messages.create, with base_url="https://abliterator.ai".

How it relates to Abliterator

For an uncensored model, the system prompt does more work. The model no longer declines by topic, so the operator's instructions are the main way to keep a product on task.

Abliterator measured this against the original models. Under a restrictive operator system prompt, off-topic requests declined went from 95% to 75% on DeepSeek V4.1 Flash Abliterated (benchmarks) and from 100% to 92.5% on Kimi K3.1 Pro Abliterated (model card). The abliterated models still follow scope rules most of the time, but less strictly than the originals. On DeepSeek, on-topic requests wrongly declined stayed at 0%. Test your system prompt before you rely on it to keep the model on topic, and enforce hard limits with your own checks. The system prompts guide covers patterns that work.

System prompts are also where professional users record intent: the scope of a pentest, the purpose of a dataset, the codebook for a study. That keeps answers relevant and leaves a record in your own logs. Abliterator does not store prompt text, so the copy you keep is the only one.

  • Prompt injection: untrusted input that tries to override the system prompt.
  • Uncensored model: a model where the system prompt is the main control.
  • Red teaming: testing whether system prompt rules hold under attack.
  • Over-refusal: a restrictive system prompt can cause it on in-scope requests.

Frequently asked questions

Do abliterated models follow system prompts?

Yes, but less strictly than the originals. Under a restrictive operator system prompt, off-topic requests declined went from 95% to 75% on DeepSeek V4.1 Flash Abliterated and from 100% to 92.5% on Kimi K3.1 Pro Abliterated. Test your system prompt before relying on it, and add your own checks where limits must hold.

Is a system prompt a security boundary?

No. Users and injected content can sometimes override it, and it can be extracted. Enforce anything that must not happen, such as data access or tool permissions, in your application code.