2.2 — System Prompts, Templates, and Guardrails
CCAR-P Domain 2 · Task 2.2
What You Need to Know
System prompt = standing contract (role, audience, policy, output format). User turns carry per-request data. Template = prompt with named slots. Guardrail = limit on what the model receives or returns.
System Prompt as Architectural Contract
Stable authority; cacheable prefix. Altitude rule: specific enough to guide, flexible enough for heuristics. Avoid both brittle hardcoded logic and vague high-level guidance.
Explicit Instructions + Escape Hatch
State role, audience, rules, conflict resolution, output format. Give motivation where helpful. Escape hatch = what to do when the task cannot be done honestly (null, “not enough information”). Without one, the contract forces invention.
Templates as Engineering Artefacts
Named slots → testable, versionable, reviewable. Use consistent XML tags for content types. Prompts in production are code.
Guardrails in Layers
- Instruction-level — scope, refusal rules, tone, escape hatch
- Input-side — validate/sanitise; delimit untrusted content as data (not instructions)
- Output-side — schema + business-rule validation before downstream consumption
Every refusal needs a route (human queue, structured error). Instructions shape behaviour probabilistically; only programmatic validation guarantees it.
Exam Traps
- Restating standing policy in every user turn instead of system prompt
- Responding to invented-fact incidents with larger model / lower temperature
- Relying on system-prompt instructions as sole guardrail
- Keeping every schema field mandatory + “never invent” rule
Check your understanding
Practice Scenario
🔒 This practice scenario is part of Skillmarked Pro
The lessons stay free. Pro unlocks the other 32 CCAR-P practice scenarios and the 63-question timed mock exam, plus everything for every other exam.
Cancel anytime. Or €199 a year, which saves 17%.
Not sure yet? Try 10 free mock exam questions.
Already Pro? Log in.
Sources
- Prompting best practices, Claude Platform Docs
- Increase output consistency, Claude Platform Docs
- Reduce prompt leak, Claude Platform Docs