System prompt

Definition
The standing instruction that frames every reply an AI gives, its role, its tone, its boundaries and what it must always follow.

Why it matters

Most of the difference between a generic chatbot and one that sounds like your company, knows your policies and stays in its lane comes from the system prompt, not from a bigger model. It is also where reliability is set. A vague prompt gives vague, off-brand and sometimes reckless output. A specific prompt does much of the work of making an agent trustworthy before any code is written. It is not a perfect safeguard, because a model can still ignore or be talked around its instructions, so important limits also need checks outside the prompt.

How to apply it

  • State the role first: who the assistant is and who it is talking to.
  • Describe the tone in words, and add one or two short examples of good replies.
  • Write the boundaries directly: what it must never say or do, instead of hoping it infers them.
  • Say what to do when unsure: ask a question, admit it does not know or hand over to a person.
  • Keep it short and specific. Long, contradictory prompts get followed unevenly.
  • When replies drift off-brand, edit the prompt first. Drift is usually a gap in the instruction, not a model fault.

What it is

When a person chats with an AI model, there are usually two kinds of input. One is the message the user types. The other is the system prompt, written in advance by whoever built the product, which the user normally never sees. It might say: you are a support assistant for this company, answer in a friendly and direct way, never promise refunds, and say so when you do not know.

It sits above the whole conversation and shapes everything the model says in it. Coding agents have a similar standing instruction, often kept in a rules file.

Common mistakes

  • Relying on the prompt as a safeguard. A model can ignore or be talked around its instructions. Put hard limits, such as refund approval, in code or process as well.
  • Writing it once and never testing it. Try awkward requests, vague questions and attempts to break the rules before launch, and again after each edit.
  • Contradictory rules. "Be brief" and "always explain fully" pull against each other. Decide which wins.
  • Pasting in everything. A long prompt full of background buries the rules that matter. Keep the standing instruction short and fetch details when needed.
  • Only saying what to do. Also say what to avoid, and what to do when unsure.
  • Treating it as secret. Users can often coax a model into revealing its prompt. Never put passwords, keys or private data in it.
Worked example

Suppose a twelve-person B2B services firm puts an AI chat assistant on its website. The first version answers any question, including pricing and refund promises the firm never meant to make. The team writes a system prompt that sets the assistant's role as a first-line helper for prospects, lists the topics it may answer, and gives one fixed line for anything it cannot answer: a person will reply within one working day. The assistant runs in Freshchat, which passes conversations that need a person into one agent inbox.

In a test of twenty sample questions, the first version gave two answers the firm could not stand behind. With the new prompt the same questions produced none, and the assistant handed four of them to a person. Prospects now hear a consistent answer, and the sales team corrects fewer mistakes each week.

Tools in the example

Some links are affiliate links: we may earn a commission at no cost to you. It never decides a ranking. How we work with partners

  1. Article

    Prompt engineering

    The skill of writing instructions well, of which the system prompt is the standing version.

  2. Article

    Guardrails

    The rules and checks that keep an agent inside safe limits.

  3. Article

    Rules file

    A similar standing instruction written for a coding agent.

  4. Article

    Context engineering

    The wider work of deciding what a model sees.