System Prompts and Roles
Level 1 · What a prompt is
What a system prompt is, the three message roles, and the custom instructions you save yourself. What a role changes, and what it never adds.
Course contentsLesson 3 of 16
Level 1 · What a prompt is
Level 2 · Writing a better prompt
Level 3 · Harder and bigger tasks
Level 4 · Prompts inside an app
After this lesson you can
- Write a short system prompt for an app
- Name the three message roles
- Say what role prompting changes and what it cannot
12 mincovers 4 glossary entries
Worth reading first: Multi-Turn Conversations
What a system prompt does, and what a role adds
A system prompt is a set of standing rules sent before the chat starts. It sets the model's job, tone and limits for all that comes after. Each message in a chat has one of three roles. System holds those rules, user is the person, and assistant is the model's own reply.
Apps write the system prompt, and users rarely see it. A bike shop's helper might say: answer only about our bikes, keep replies under 80 words, never promise a refund. Put the same model under a new system prompt and you get a new product. One model can run a tutor, a help desk and a recipe app.
Custom instructions are the same idea for you as a user. You save a few lines once in the app's settings, such as use short words or keep answers brief. The app adds them to the start of every new chat. Keep them short. Ten rules that clash work worse than three that do not.
Role prompting tells the model to act as a kind of person: a patient tutor, a strict editor, a travel agent. The role changes the tone, the words it picks and what it notices. It works best with details about the reader. A tutor for a 10-year-old says far more than a tutor.
A role does not add knowledge. Telling a model it is a top doctor does not make its facts better. It mostly changes the style. If you need better facts, give the model the facts, or check its answer against a source you trust.
The system prompt gets extra weight, but it is still only text. A user can sometimes talk a model out of its rules. So never put a password or a secret in a system prompt, and never treat it as a lock. Limit what the app can do, not just what it is told.
Put the rules that never change in the system prompt, and the request of the day in the user message. Rules that apply to every chat go in once. The question goes below them. Mixing the two makes the rules harder to find and harder to test.
You are the help desk for Lucy's Bikes, a shop in London.
Answer only questions about our bikes, repairs and opening hours.
Keep every reply under 80 words.
If you do not know, say so and give the shop's phone number.
Never promise a refund. Say a person will reply within one day.Worked example
Emma sets up a homework helper
Emma's son is 11 and uses an AI chat app for homework. She saves three custom instructions: explain with short words, give a hint, never give the final answer.
His next maths question gets a hint and a question back, not the answer. He finds the answer himself in two more messages.
The words for this lesson4
Check yourself
Does telling a model it is a top expert make its facts more true?
Finished this lesson?
Marking it complete also marks its 4 glossary entries learned, which updates your roadmap and your saved page. 0 are already marked.