6.2 — Prompt Engineering
CCDV-F Domain 6 · Task 6.2
What You Need to Know
Four choices: where an instruction sits, how clearly it is worded, what output shape it asks for, and how incoming material is marked off. Test one change at a time.
Where an Instruction Sits
- Durable material → top-level
systemfield (who Claude is, standing rules, tone, scope, refusal boundaries) - Per-request material → user turn (this task, this document, this question)
- Mid-conversation system messages — append a role
systemmessage where the new instruction becomes relevant. System takes precedence over user. Later system messages take precedence over earlier ones. Cannot be first entry; must follow user/assistant turn; must end array or be followed by assistant turn.
Not a place for untrusted content. Third-party material stays in tool_result blocks.
Which Surface Carries an Instruction
- Tool description → when that tool applies and its boundaries
- Schema field descriptions → what each field means
- CLAUDE.md / rules → standing conventions (Claude Code)
- System prompt → what must hold whichever tool or task is in play
Put each instruction on the surface guaranteed to be present when it must apply. Treat a duplicated instruction as a defect.
Writing Clear Instructions
Golden rule: “Show your prompt to a colleague with minimal context. If they’d be confused, Claude will be too.” Say what to do rather than what to avoid. Give the motivation. Decompose into ordered steps. State audience, format and length explicitly. Current models follow wording closely and may not generalise — state the scope. Match prompt style to desired output. Emphasis tuned for older models now overshoots.
Worked Examples
Three to five examples, each: relevant, diverse, structured (wrapped in example tags). Inconsistent examples teach inconsistency. Undelimited examples look like the task.
Constraining the Output
Describe format explicitly; give a template or worked example. Where output feeds a machine, use structured outputs (constrained decoding). max_tokens is a hard cap, not a brevity instruction — truncated responses stop mid-sentence.
Gone on current models:
- Prefilling the assistant turn (400 on Claude 4.6+)
- Non-default temperature / top_p / top_k (400 on Claude 4.7+)
Replacements: structured outputs for format control; direct system-prompt instruction (“Respond directly without preamble”) for preamble suppression.
Check your understanding
Practice Scenario
🔒 This practice scenario is part of Skillmarked Pro
The lessons stay free. Pro unlocks the other 24 CCDV-F practice scenarios and the 53-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
- Prompt engineering overview, Claude Platform Docs
- Prompting best practices, Claude Platform Docs
- Building with the Claude API, Anthropic Academy