g↗genai/ learner
Prompting and Working with AI / Lesson 03

System instructions and roles

You can shape how an AI assistant replies before a user even asks a question. System instructions set standing rules and roles guide perspective — but neither guarantees what the model will do.

Concept + interactive labBeginner friendly

Standing rules before the question.

A common assumption is that telling an AI “you are an expert” makes its answers expert-level, or that a strict rule in the setup locks its behaviour down. Neither is true.

In this lesson you meet four ideas, in order: the system instruction, the user message, the role, and why all of them are soft steering rather than hard guarantees.

Running example: Harbor Bike Shop

Harbor Bike Shop is an invented neighborhood shop with a chat assistant called Harbor Helper. It has no live price list and cannot see a customer’s bike. It is not a real product.

System instructions set the standing rules.

Think of a briefing card taped beside a shop’s help desk. Before any customer walks in, the card lists standing rules for how to respond, while each customer’s question is a separate note handed across the counter.

The analogy has limits. A language model is not a human clerk who understands safety or keeps promises.

In an AI app, that briefing card is the system instruction (sometimes called a system prompt or custom instructions). Each question someone types is the user message.

Behind the scenes, the app sends the system instruction ahead of the user message as input text. Many chat models are trained to give system instructions higher priority than user messages, yet both still work by steering which words the model predicts next.

In Harbor Bike Shop

Harbor Helper’s system instruction says: “Reply in 3 short steps. Never guess repair prices.” When a rider sends the user message “My chain slipped off while riding to work. What should I do?”, both pieces enter the model together.

Outside a bike shop, you see the same setup in everyday chat apps: for example, setting custom instructions so a study assistant explains ideas in plain words and ends with one short review question.

Diagram titled System Instruction vs. User Message: System instruction (3 short steps, No price guesses) and User message (My chain slipped off) both flow right into the Language model, which outputs a Steered reply (Step 1, Step 2, Step 3). Bottom note: Sent ahead of each message to steer replies — not a guarantee.
In a typical chat setup, the app sends the system instruction ahead of each user message; both enter the model as input text.

Roles guide perspective, not expertise.

A role is a short framing line — often placed at the start of a system instruction — such as “You are a friendly bike mechanic.”

Roles steer how a reply is framed: its tone, vocabulary, format, and which details it highlights. Compare two roles on the same slipped-chain question:

  • Friendly bike mechanic

    “You are a friendly bike mechanic. Use plain words.”

    Focuses on practical, hands-on steps: stop safely, rest the bike upright, hook the chain back onto the gear ring, and keep fingers and cloth clear while slowly turning the pedals to test it.

  • Cautious cycling safety coach

    “You are a cautious cycling safety coach. Put roadside safety first.”

    Focuses on moving out of traffic, keeping hands clear of moving gears, and checking brakes before riding again.

Notice what a role does not add. Writing “You are a master bicycle engineer with 30 years of experience” does not add new training, connect the model to Harbor Bike Shop’s price list, or turn it into a real expert.

The same limit applies outside bike repair. Telling a chat model “You are a board-certified doctor” may make its reply sound more clinical and organized, but it does not give the model medical training or make its health advice reliable.

Comparison diagram titled What a Role Does: a green Can shift card lists Tone, Focus, and Format; a red Does not add card lists New training, Live prices, and Hard guarantees. Bottom note: A role steers how a reply is framed — not new training or live data.
A role can shift tone, focus, and format, but it cannot supply new training, live data, or hard guarantees.

Same question, different instructions.

Test how Harbor Helper’s reply changes when you swap the system instruction or send a message that pushes against the rules.

  1. Keep Normal question selected and switch between No shop instruction, Mechanic role + rules, and Safety coach role + rules to see tone and focus shift.
  2. With a system instruction active, switch to Rule-pushing message to see how soft steering can slip under a conflicting request.
  3. Use Reset to return to the unsteered starting point.
Harbor Helper — Instruction Lab
1. Pick a system instruction
2. Pick the customer message
System instruction

(No Harbor Helper instruction added — in real chat apps, default system instructions may still run in the background.)

User message

“My chain slipped off while riding to work. What should I do?”

Simulated reply

A slipped chain happens fairly often on commuter bikes, usually when shifting gears on a hill or bump. You can pull over, rest the bike against a wall, check the rear gear tension, and guide the chain back onto the front gear ring, though if it keeps slipping a shop might charge around $20 to adjust it.

What the instruction steered

No shop-specific rules were added, so the reply rambles in one long paragraph and mixes casual guesses with extra details.

What it did not guarantee

Without shop boundaries, the reply invents a $20 estimate even though Harbor Helper has no price list.

Simulated replies for illustration — not a live AI model or a specific provider. Real models vary from run to run.

Showing simulated reply with no shop instruction on the normal question. The reply is a long paragraph that guesses a price.

Why instructions steer rather than guarantee.

System instructions are soft steering. They nudge next-word predictions strongly in typical chats, so they help most of the time — but they are not hard code locks.

Three common situations can make a standing rule slip:

  • Conflicting user messages. A user may ask the model to ignore earlier rules or push hard for forbidden details. Even when models are trained to prioritize system instructions, that priority can still fail.
  • Crowded instructions. Packing dozens of rules into one system prompt makes it more likely that a detail — such as a 3-step limit — gets dropped.
  • Missing facts. Telling a model “Never guess repair prices” does not give it a real price list. Without real data or a check, it can still produce a plausible-looking number.

When a rule must hold every time — such as hiding unverified prices or looking up real shop rates — the guarantee comes from ordinary app code and real data around the model, not from wording alone.

Quick questions

  • Does a bigger title (“world-class expert”) make facts more accurate?

    No. A role can guide framing and tone, which may help organize a reply, but it adds no new training or live facts.

  • If I put a rule in the system instruction, can I skip checking the reply?

    No. Treat system instructions as helpful guidance, and still check important outputs or enforce strict rules in app code.

  • Where do everyday users set system instructions?

    In many chat tools they appear as “custom instructions” or project instructions; in custom apps, developers set them behind the scenes.

✎ Try it yourselfKnowledge check · Practice only

Check your understanding.

Harbor Bike Shop gives its chat assistant this system instruction: “You are a master bicycle mechanic with 20 years of experience. Always keep replies to three steps and never guess repair prices.” The assistant is not connected to the shop’s price list. A customer asks how much a chain repair costs, and the assistant replies with four steps and guesses “$20”. What does this show?
THE TAKEAWAY

Take this with you.

Use a system instruction to set standing rules and a role to guide tone and perspective. Remember that both are soft steering: neither turns a model into a real expert, supplies missing facts, or guarantees every rule will hold. When a rule cannot fail, back it up with real data and checks around the model.