Claude Certified Architect – Foundations Practice Question 47: System Prompt Role Placement
Claude Certified Architect, Foundations · Test 5 · question 7 of 10
A developer builds a legal-intake assistant on the Messages API. Every request must make Claude behave as a careful paralegal assistant with a consistent tone. Each individual request also asks for a different task, such as "summarize the attached intake form" or "list missing fields in this form", along with the form text. Where should each piece of the prompt go?
Show answer and explanation
Answer:
Setting a role in the system prompt focuses Claude's behavior and tone for your use case, even with a single sentence. The system prompt is the stable, reusable part of every request, so it holds the persona and standing behavior. The per-request task and its input data vary every time, so they belong in the user turn. This also keeps the stable prefix identical across calls, which helps caching.
A is wrong because it puts variable content in the stable slot and leaves no user turn to carry the request; the Messages API expects the conversation to begin with a user message. B is wrong because it inverts the roles: the changing task would sit in the system prompt, and the persona would be only a per-message hint. C is wrong because an assistant message is a prior Claude turn, not a place for configuration; fabricating one to define a persona is fragile and is not how roles are set.