Pebellslearn by building
0%
RoadmapsMatrixCoursesSandboxSign in
Core Prompting Techniques  ›  Capstone Project

System, Role and Contextual Prompts

System Prompting 15 minA system prompt sets standing rules, a role sets the voice and expertise, and context supplies the facts for this particular task.

System, Role and Contextual Prompts

The reply-drafting prompt had grown into one long paragraph: rules about length, a request to sound friendly, today's repair queue, the customer's service history and the email itself, all jumbled together. Every time the owner updated the queue length, a rule got accidentally deleted. Splitting the prompt into layers solved it.

The rule

System sets the rules, role sets the voice, context sets the facts.

  • System prompt — standing instructions that apply to every conversation: boundaries, format rules, what never to do. Chat APIs usually have a dedicated system message for this, and models are generally trained to give it more weight than ordinary messages.
  • Role prompt — who the model should act as: "You are an experienced bike mechanic who explains things simply." A role packs expertise, vocabulary and tone into one line.
  • Contextual prompt — the facts for this task: the customer's history, current repair times, the relevant policy. It changes on every call.
[System]
You draft email replies for Spoke & Chain. Keep replies under 120 words.
Never promise refunds; say the team will review them. Sign off as
"The Spoke & Chain team".

[Role]
You are a friendly, experienced bike mechanic who explains things simply.

[Context]
Customer: Priya. Bike: 2019 city bike, serviced 2 March.
Current repair queue: 5 days.

[Email]
My gears are slipping again. How soon can you look at it?

A good reply would mention a slot in about five days, explain simply, stay under 120 words and sign off correctly — each layer doing its own job.

The shortcut

For every sentence in a messy prompt, ask "Is this true for every call, or only this one?"

  • True for every call, and a rule → system.
  • True for every call, and about voice → role.
  • True only now → context.
Sorting the jumbled reply promptStep 1 of 4
  1. "Keep it under 120 words"

    A rule for every reply. System.

A role improves tone and focus, but it does not add knowledge. "You are a world-class mechanic" will not make the model know Spoke & Chain's stock; that still belongs in context.

Drills

Answer fast — trust the rule.

quick drill

Where should "Never promise refunds" go?

quick drill

"This customer's bike was serviced on 2 March." Which layer is this?

quick drill

What does a role prompt mainly add?

quick drill

Why keep the three layers separate instead of one long paragraph?

Remember

  • System sets the rules, role sets the voice, context sets the facts.
  • Shortcut: "true for every call, or only this one?"
  • Trap: expecting a role to supply knowledge it was never given.

Practice — level up

0/1 solved

Write your answer, then compare it with a rubric and a model answer.

ExplainBuild the three layers

Write a short system prompt, a role line and a piece of context for Spoke & Chain's reply-drafting assistant, and explain what each layer is for.