Beginner level · Module 3 of 7 · 7 guided hours
Prompt Engineering for AI Agents
Writing agent instructions that work: roles, rules, examples, grounding in documents, refusal and hand-over rules, and testing instructions systematically. General prompting is covered in the AI programme; this module focuses on instructions for agents.
Learning objectives
- Write structured agent instructions with role, task, rules and format
- Ground answers in approved documents and define refusal rules
- Test and revise instructions systematically
Topics
- role and task
- rules and constraints
- examples (few-shot)
- grounding and citation rules
- refusal and hand-over rules
- testing and versioning instructions
Lessons
-
Lesson 1 Anatomy of an Agent Instruction
Learners build agent instructions from clear parts (role, task, context, rules, output format) and see how each part changes behaviour.
roletaskcontextrulesoutput format
-
Lesson 2 Grounding, Citations and Refusals
Learners write rules that keep answers inside approved documents, require citations and define when the agent must decline or hand over to a person.
groundingcitationrefusalhand-overout-of-scope questions
-
Lesson 3 Testing and Improving Instructions
Learners build a small test set, run it after every change and keep a change log, so that improvements are measured rather than guessed.
test setexpected behaviourregressionversioningchange log
Practical activity
Develop the level project instructions through three tested versions with a 20-question test set and change log.
Expected outcomes
- Ability to write and test agent instructions
- Disciplined, measured improvement habits
Assessment
Instruction set and test results (70%) and change log (30%).
Taught live by an instructor — online or in person. Free course lessons are for self-study and do not lead to a certificate — see registration options.