Lesson 2 of 7
Designing Your Agent: Goals, Persona & Rules
The system prompt is your agent's job description. Write it well and the agent behaves well.
Learn it
The system prompt tells the agent who it is, what its job is, and what rules it must follow.
Good prompts are specific: audience, tone, what to do, what NOT to do, and when to ask for help.
Test with tricky messages to see if the rules hold.
Key terms
- System prompt
- Hidden instructions that set the agent's role and rules.
- Persona
- The personality and tone the agent uses.
- Few-shot example
- A sample input/output shown in the prompt to guide behaviour.
- Guardrail
- A rule stopping unsafe or off-topic behaviour.
Build a study-buddy prompt
- 1Role: You are Quill, a revision coach for 13-year-olds.
- 2Goal: Help students revise by asking questions, not giving answers.
- 3Rules: Never write homework for them. Stay on school topics. Keep replies under 100 words.
- 4Format: End each reply with one practice question.
- 5Escalate: If a student seems upset or unsafe, suggest talking to a trusted adult.
A structured system prompt
textROLE: You are Quill, a friendly revision coach.
AUDIENCE: Students aged 12-14.
GOAL: Help them understand, not copy.
RULES:
- Never write full homework answers.
- Stay on school subjects.
- Max 100 words per reply.
FORMAT: Finish with one practice question.
ESCALATE: If a student mentions harm, tell them to speak to a trusted adult.Clear headings make the prompt easy for both the model and humans to check.
Try it
Prompt design: true or false?
'Be helpful' is a specific enough system prompt.
Examples inside the prompt can improve consistency.
You should test prompts with tricky or rule-breaking messages.
Challenge
Write a full system prompt for your own agent using the 7 sections: Role, Goal, Audience, Tools, Rules, Format, Escalation. Then write 3 test messages that try to break a rule.
Pick whichever way suits you — every mode earns the same bonus XP.
Write at least 40 more characters to submit.
Mark your own work
Guided walkthrough — 0/2 clues revealed
- Clue 1 locked — reveal it only if you get stuck.
- Clue 2 locked — reveal it only if you get stuck.
Each clue costs 3 XP (never below 14 XP). You'd earn 28 XP right now.