Prompt and Context Optimisation
Treat prompts, examples, tool descriptions and skills as versioned, measured artefacts, and improve them by hand, by optimiser and in production without breaking what already works.
2 modules · 7 lessons~17 hoursUpdated 2026-10-30
- Lessons7
- Quizzes7
- Sources42
- Of study~17h
About this course
About this course
A business running agents in production has dozens of per-step agents, and each one carries prompts, few-shot examples, tool descriptions and skills that drift, rot and break when the model changes. This course teaches the engineering discipline for that text: how to write prompts for current Claude models and what to delete from old ones, how to choose examples, how to iterate against an eval without fooling yourself, what DSPy, MIPROv2 and GEPA really buy you, how to optimise tools and skills, and how to version, A/B test, migrate and regression-test prompts in production. The running examples are a report summariser and a follow-up questions drafter; code is short Python, and exercises run on your Claude subscription.
About the running example
The examples follow a fictional property-law (conveyancing) firm in England and Wales: a summariser for property search reports and a drafter for pre-contract enquiries. It's a case study, chosen because its documents are long, structured and high-stakes. You don't need a legal background, and the same patterns apply to contracts, insurance claims, invoices, support tickets or patient records. In the lessons, a matter is one client's case and a solicitor is the lawyer who signs work off.
What you'll learn.
- 1Rewrite a prompt for current Claude models: structure, context and reasons, examples and effort settings, and remove the patterns that were written for older models
- 2Select, order and place few-shot examples deliberately, and measure whether they help or anchor the model
- 3Run an eval-driven iteration loop with a frozen test split and a prompt changelog, and estimate how much of a dev-set gain is selection noise
- 4Optimise a prompt with DSPy (MIPROv2) and GEPA, cost the run, and judge the result against a held-out set
- 5Optimise tool descriptions, agent instructions and skills against trigger and task evals, not only single prompts
- 6Version prompts in a registry, run a case-level online test with sample-ratio and peeking safeguards, and migrate a prompt to a new model behind a regression suite
2 modules, 7 lessons.
8h 15m of lessons
Module 1 · 3 lessons · 3h 20m
Designing prompts systematically
How current Claude models read a prompt, how to choose the examples it sees, and the eval-driven loop that turns prompt changes from opinions into measurements.
Module 2 · 4 lessons · 4h 55m
Optimising and operating prompts
Automatic optimisers and what they really buy, optimising tools and skills, and the production machinery for prompts: registries, online tests, model migrations and regression suites.
Optimise and ship the questions drafter
Take a follow-up questions drafter from a legacy prompt to an optimised, versioned, regression-tested configuration that can survive a model migration, using every technique in the course, and write a release note you could defend line by line.