CCAO-F Claude Model Fundamentals Practice Question
Exhibit
{
"model": "claude-3-5-sonnet-20240620",
"max_tokens": 1024,
"messages": [
{"role": "user", "content": "Analyze this code."},
{"role": "assistant", "content": "The code has a bug."},
{"role": "user", "content": "Fix it."}
],
"system": "You are a helpful assistant."
}Refer to the exhibit. An application sends the provided JSON payload to the Anthropic API. What is the expected behavior regarding the system prompt?
⚠ Common exam trap
Many test-takers mistakenly believe system prompts should be nested inside the messages array alongside user and assistant turns.
Answer choices
Why each option matters
Answer the question above first, then reveal the full breakdown to understand why each option is right or wrong.
Correct answer & explanation
✓
The API will correctly apply the system prompt to the entire conversation turn.
In the Anthropic Messages API, the system prompt must be defined at the top level of the JSON object, not within the messages array. Because the system prompt is defined correctly at the top level in this exhibit, it will be correctly processed. Understanding this structure is essential for developers to correctly separate behavioral instructions from conversational history, preventing unexpected model behavior during multi-turn API interactions.
Answer analysis
Option-by-option breakdown
For each option: why learners choose it and why it is or isn't the right answer here.
- ✗
The API will return an error because the system prompt is improperly formatted.
Why it's wrong here
The system prompt is correctly placed at the top level of the JSON request body. The API specification requires 'system' to be a string at the root, distinct from the 'messages' array. Therefore, the payload is syntactically valid and will be accepted and processed by the Claude API.
- ✗
The system prompt will be ignored because it must be inside the messages array.
Why it's wrong here
The API design intentionally separates the system prompt from the messages array to ensure behavioral instructions persist across the entire conversation. Placing it inside the messages array would actually be incorrect and lead to API rejection. The top-level placement is the required format for Anthropic's current API standards.
- ✓
The API will correctly apply the system prompt to the entire conversation turn.
Why this is correct
The system prompt is correctly defined at the top level of the request. The Claude API uses this field to set the 'persona' or constraints that govern the model's behavior for the entire session. This ensures the assistant maintains the intended behavior throughout the multi-turn exchange provided in the messages.
- ✗
The model will see the system prompt as the latest user message.
Why it's wrong here
The API parser treats the 'system' key as a distinct field from the 'messages' array. It does not treat the system prompt as a user turn. This separation is crucial for maintaining a clean conversation history where the model can distinguish between user inputs and high-level behavioral directives.
About these practice questions
Courseiva writes every CCAO-F question from scratch — 259 in total, each with an explanation and a wrong-answer breakdown. None are copied from real exams or dumps. Learn why practice questions differ from exam dumps →
JA
Written and reviewed by Johnson Ajibi, MSc IT Security
Senior Network & Security Engineer · founder of Courseiva
Last reviewed September 2026 · checked against the official Anthropic exam blueprint
This CCAO-F practice question is part of Courseiva's free Anthropic certification practice question bank. Courseiva provides original exam-style practice questions with explanations, topic-based practice, mock exams, readiness tracking, and study analytics to help learners prepare for the CCAO-F exam.