How a system prompt works
When a chatbot or assistant is set up, whoever built it writes instructions the model receives with every single request, before whatever the user typed. That is the system prompt. It typically states who the assistant is meant to be, what it can help with, what it must refuse, the tone to use, and what to do when it does not know the answer. The person chatting never sees it.
The model treats it as strong guidance, but it is still text competing with everything else in front of it. A long conversation, a contradictory instruction from a user, or an unusual request can pull the model away from it. That distinction matters more than anything else on this page: a system prompt shapes behaviour, it does not enforce it.
Why system prompts matter
They are where a generic model becomes your assistant. The same underlying model can answer as a support agent for a clinic or as a booking assistant for a trekking company, and the difference is almost entirely in this text. Brand voice, the questions it should ask before giving an answer, the products it should never discuss and the point at which it hands over to a person all live here.
They are also where most of the risk sits in a customer-facing bot. Anything left unstated is decided by the model’s defaults. If the prompt never says what to do about pricing questions, refund promises or medical and legal queries, it will still answer them, plausibly and on your behalf, in public.
Common mistakes with system prompts
Putting secrets in one is the serious mistake. Prices you have not published, internal margins, discount limits, staff names, API keys — all of it can be coaxed out by a determined user, and none of it belongs in text the model can repeat. Treat everything in a system prompt as potentially public.
Writing it as a wish list is the common one. Vague instructions to be helpful and professional leave every difficult case to the model. Good prompts name specific situations: what to do when a customer asks for a discount, when a question is outside scope, when the answer is not in the supplied material, and when to escalate to a human.
The last mistake is treating it as a control that has been tested. Nobody knows how a prompt behaves under pressure until someone deliberately tries to push past it.
How to act on it
Write the rules that matter as explicit cases rather than principles, and always include a fallback: say plainly what the assistant should do when it does not know, which is normally to say so and offer a human. Keep pricing and policy in a source it looks up rather than baked into the instruction, so a change does not mean rewriting the prompt.
Then test it adversarially before launch. Ask it for a discount, ask it to ignore its rules, ask something it should refuse, and ask a question your material does not cover. Keep the prompt in version control or a shared document so changes are traceable, and review it whenever the model updates. This is routine setup work for any AI chatbot on a website, alongside the guardrails that sit outside the model.
