A custom chatbot starts behaving before the first user message arrives. Behind the chat window sits a block of standing instructions that tells the model who it is, what it knows about, what it must always do and how its answers should look. That block is the system prompt, and writing it well is mostly a matter of writing a small number of clear fields instead of one long, tangled paragraph.
This guide walks through those fields and shows how to assemble them with the free System Prompt Generator on Ovatly. The tool is a template assembler: you write every line, and it arranges your fields in a consistent structure, in plain text, Markdown or JSON, with the formatting handled for you.
Contents
- Quick answer
- What a system prompt is
- The five building blocks
- Choosing plain text, Markdown or JSON
- How to build a system prompt, step by step
- Worked example: a support agent in plain format
- Limitations
- Common mistakes
- FAQs
- Conclusion
Quick answer
To write a system prompt for a custom chatbot: decide the persona in one phrase, name the area of expertise, write a short set of always-follow rules (one per line), add output rules for length, language and structure, and optionally include an example exchange that shows the behaviour you expect. Then assemble the fields in a fixed order and copy the result into your chatbot or API setup. The System Prompt Generator does the assembling: fill in the behaviour fields, pick plain text, Markdown or JSON, and copy the generated prompt.
What a system prompt is
A system prompt is the standing instruction given to a model before the conversation starts. Unlike an ordinary prompt, which asks for one answer, the system prompt sets identity, expertise, rules and answer format for every reply that follows. Users never see it, but every answer they get is shaped by it.
Because it applies to the whole conversation, small problems in a system prompt repeat everywhere. A vague persona produces vague answers in every session. A pair of conflicting rules gets resolved unpredictably, again and again. That is why the writing deserves care, and why a fixed structure helps: when each kind of instruction has its own place, gaps and contradictions are easier to spot.
The five building blocks
Persona. Who the assistant is, in one phrase. "A concise technical support agent" is a persona; a paragraph of biography is not. One phrase forces you to decide what the assistant fundamentally is before you decorate it.
Expertise. The area the assistant speaks about. Naming it tells the model where its answers should concentrate, and it gives you a natural boundary for what the assistant should decline or hand off.
Rules. The behaviour the assistant always follows, one rule per line. Rules are hard constraints on conduct: what it must do, what it must never do. Keep them few and clear. A long list invites conflicts, and conflicting rules are resolved unpredictably.
Output rules. How answers should be formatted: length, language and structure. "Keep answers under 120 words" and "Answer in plain English" are output rules. They shape every reply without changing what the assistant knows.
Example exchange. An optional sample of expected behaviour. One short exchange shows the model the pattern you want more concretely than another paragraph of description can.
Choosing plain text, Markdown or JSON
The same fields can be delivered in three formats. Plain text suits most chat tools: you paste the block in and it reads as ordinary instructions. Markdown helps long rule sets stay readable, because headings and numbered lists keep the sections distinct. JSON suits API integrations that pass the prompt as structured data: in JSON format the fields become an object under a system role, with quotes and newlines escaped for you by JSON.stringify, so the result is safe to paste into an API payload. Choose by where the prompt will live, not by which looks most technical.
How to build a system prompt, step by step
- Open the System Prompt Generator and write the persona: who the assistant is, in one phrase.
- Add its area of expertise and its always-follow rules, one per line.
- Add output rules (length, language, structure) and optionally an example exchange.
- Pick plain, Markdown or JSON and copy the generated system prompt.
Before you paste it anywhere, read the assembled result as a whole. The generator arranges your fields and never invents rules you did not write, so anything wrong in the output is a line you typed, and it is fastest to fix it now rather than after a week of odd answers.
Worked example: a support agent in plain format
The generator's own example builds a support agent. The fields are:
- Persona: "a concise technical support agent"
- Expertise: "home Wi-Fi routers"
- Rules: "Never guess a password" and "Ask one question at a time"
- Output rules: "Answer in plain English" and "Keep answers under 120 words"
In plain format, the assembled output is:
You are a concise technical support agent.
Your area of expertise is home Wi-Fi routers.
Rules you always follow:
1. Never guess a password
2. Ask one question at a time
How you format your answers:
1. Answer in plain English
2. Keep answers under 120 words
Notice what the example does well. The persona is one phrase. There are only two rules, and both are checkable: you can tell from any answer whether the agent guessed a password or asked two questions at once. The output rules are equally testable: plain English, under 120 words. A system prompt you can audit like this is one you can improve, because failures point at a specific line.
Limitations
The generator is template assembly. It arranges your fields; it never invents rules you did not write, and it cannot judge whether your rules are wise, complete or consistent with each other. That judgement stays with you.
The deeper limit belongs to system prompts themselves: a system prompt guides a model, it cannot guarantee behaviour. A rule reduces the chance of an unwanted answer; it does not make that answer impossible. Test the result with real questions, including awkward and adversarial ones, before relying on the chatbot with real users, and keep testing after changes. Treat the first version as a draft that real conversations will correct.
Common mistakes
- Writing a biography instead of a persona. The persona field takes one phrase. Long backstories dilute the instruction and crowd out the rules that actually steer answers.
- Too many rules. Fewer, clearer rules work better than a long list. Every extra rule is another chance for a conflict.
- Conflicting rules. "Always answer fully" and "Keep answers under 120 words" pull in opposite directions. If two rules conflict, the model resolves the conflict unpredictably, differently each time.
- Skipping output rules. Without length, language and structure rules, answer format drifts from reply to reply, and the chatbot feels inconsistent even when its facts are right.
- Copying without testing. An assembled prompt that reads well can still behave badly. Run real questions through it first.
FAQs
What is a system prompt? It is the standing instruction given to a model before the conversation starts. It sets identity, expertise, rules and answer format for every reply that follows.
Which format should I choose? Plain text suits most chat tools. Markdown helps long rule sets stay readable. JSON suits API integrations that pass the prompt as structured data.
How many rules should I add? Fewer, clearer rules work better than a long list. If two rules conflict, models resolve the conflict unpredictably, so read the set as a whole before copying.
Does the generator write rules for me? No. Every rule in the output is a line you typed; the tool only numbers and arranges them.
Can a system prompt guarantee how the chatbot behaves? No. A system prompt guides a model; it cannot guarantee behaviour. Test the result with real questions before relying on it.
Conclusion
A good system prompt is short, specific and testable: one phrase of persona, a named area of expertise, a few rules that never conflict, output rules that fix length, language and structure, and an example when behaviour is easier to show than describe. The System Prompt Generator keeps that structure consistent across plain text, Markdown and JSON, so you can spend your effort on the wording instead of the formatting. For the next step, see the companion guide on how to give a chatbot a personality with a system prompt, and browse the full set in the AI and Prompt Tools guides.