Track 01 · Models & contextLesson 05 of 10

System prompts that survive a regulated rollout

Numbered, owned clauses that compliance can read and you can test.

What you'll be able to do

What you'll be able to do

01
  • Explain what each section of a production system prompt controls and what a system prompt cannot guarantee.
  • Design a persona specification with numbered clauses that legal, compliance and model risk can sign, and trace each clause to a test.
  • Structure layered prompts (platform policy, tenant, use case, session) with explicit precedence, and render them from a versioned template with validated variables.
  • Implement static checks on the rendered prompt and a behavioural probe suite covering in-scope, off-topic and adversarial requests.
  • Diagnose and fix common anti-patterns: shouting, contradictions, leaky examples, dynamic content at the top, secrets in prompts.
Before you start

Before you start

The short version

The short version

A system prompt is the operating brief for a model: who it is, who it serves, what it may and may not do, how it sounds, how it refuses, when it escalates, what format it returns, and how to use its tools. In a regulated rollout that brief stops being a developer's text file and becomes a contractual artefact: compliance signs the scope, legal signs the disclaimers, model risk signs the refusal behaviour. So treat it like code and like a contract at once. Write it as numbered clauses in labelled sections. Compose it from layers with a stated precedence (platform policy first, then tenant, then use case, then session context), keep static layers first so caching works, and inject session values only after validation. Test the rendered text in CI for required clauses, placeholders and anti-patterns, and test behaviour with probes that try to push the persona off scope. Remember what a prompt is not: it is not an access control and it is not a secret.

  • Numbered clauses make a persona auditable. Every clause maps to an owner and a test.
  • Layers with explicit precedence stop tenant or user text overriding platform policy.
  • Static first, dynamic last. Caching, auditing and diffing all depend on it.
  • Refusals are designed, not improvised: short, helpful, consistent across languages.
  • Prompts guide behaviour; code enforces it. Permissions, secrets and consequential actions live outside the prompt.

Pro lesson

The rest of this lesson is in Pro.

The mental model, worked example, field note, failure table, exercise and self-check, with the voice tutor.

  • Every stage and specialisation, in full
  • Every lab and every role project
  • Halden weeks 2–10, on your record
  • Every drill, live in the playground
  • All solutions, plus the server judge
  • Lab Assistant and every Teach with AI