Anthropic's prompt engineering documentation for Claude recommends "giving Claude a role." Where does it say a role description should be written, and why?
- In the system prompt, because even a single sentence establishing a role there focuses Claude's behavior and tone for the specific use case
- In the final line of the user's message, because Claude only applies role instructions that appear immediately before the question being asked
- In a separate fine-tuning dataset, because role behavior can only be changed by retraining the model on role-labeled examples
- In the assistant's prior turn, because Claude infers its role only from how it phrased earlier responses in the conversation
Correct answer: A. In the system prompt, because even a single sentence establishing a role there focuses Claude's behavior and tone for the specific use case
Anthropic's documentation states that setting a role in the system prompt focuses Claude's behavior and tone for the use case, and notes that even a single sentence placed there makes a measurable difference -- no fine-tuning or special placement within the user turn is required. The second option is wrong because placement within the user message is not how the documented technique works; the system prompt is a separate, dedicated field intended for this kind of persistent framing. The third option is wrong because role-setting as documented here is a prompting technique applied at inference time through the system prompt, not a training-time intervention requiring a labeled dataset. The fourth option is wrong because it describes the model inferring a role from its own past outputs rather than being told a role explicitly up front, which is not the mechanism the documentation describes.
Source: Anthropic, "Prompting best practices" -- "Give Claude a role" section, platform.claude.com prompt engineering documentation