D6: Instruction Placement & Input Sanitization
Claude Certified Developer – Foundations exam practice questions · 10 flashcards
Question
What belongs in the system prompt?
1 / 10
Tip: Space flips the card, ← / → navigate.
Show all 10 Instruction Placement & Input Sanitization practice questions and answers
- What belongs in the system prompt?Role, persistent rules, constraints and output format that apply to the whole conversation.
- What belongs in the user message?The specific task, input data and per-request details.
- Where should long documents go in a prompt?Near the top, with the question/instructions after them.
- Where do tool usage instructions belong?In the tool descriptions, plus any cross-tool guidance in the system prompt.
- How should instructions be placed across agent components?Global rules in the system prompt, task details in messages, tool-specific details in tool definitions, subagent briefs in their prompts.
- What is input sanitization?Cleaning and validating user or external input before putting it into a prompt.
- Which sanitization steps are common?Length limits, stripping control characters or markup, escaping delimiters, and removing secrets/PII.
- Why escape or strip your delimiter tags from user input?So users can't close your tags and inject fake instructions.
- Is sanitization alone enough against prompt injection?No. It's one layer; combine it with boundaries, least privilege and guardrails.
- Why avoid mixing untrusted input into the system prompt?System content is treated as trusted; untrusted text there gains authority it shouldn't have.