Courseiva

CCAO-F Prompting and Context Engineering Practice Question

Exhibit

{
  "model": "claude-3-5-sonnet-20240620",
  "max_tokens": 1024,
  "system": "You are a data analyst.",
  "messages": [
    {
      "role": "user",
      "content": [
        {
          "type": "text",
          "text": "Analyze this CSV: <data>id,val\n1,10\n2,20</data>",
          "cache_control": {"type": "ephemeral"}
        },
        {
          "type": "text",
          "text": "What is the average value?"
        }
      ]
    }
  ]
}

Refer to the exhibit. A developer is testing this API request to optimize their analysis tool. Why will this specific request fail to provide the intended performance benefits of prompt caching?

⚠ Common exam trap

Candidates often overlook the 1024-token minimum requirement, assuming that any prompt segment can be cached regardless of its length or the specific API configuration used.

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 content marked for caching is significantly below the 1024-token minimum requirement.

This question highlights the token threshold requirement for prompt caching. In the exhibit, the total token count of the CSV data and instructions is far below the 1024-token minimum required by Anthropic's caching mechanism. Understanding these limits prevents developers from misconfiguring their applications or expecting cost savings on prompts that do not meet the technical criteria.

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 cache_control block is placed inside the user role instead of the system role.

    Why it's wrong here

    Caching is supported in both the system prompt and the messages array. While caching the system prompt is common, developers are permitted to cache specific blocks within a user message, provided they meet the size requirements and are positioned correctly relative to other non-static content.

  • ✗

    The XML tags used in the text content are not valid standard HTML syntax.

    Why it's wrong here

    Claude uses XML tags as structural indicators, but they do not need to follow strict HTML standards to be effective. The model is trained to recognize custom tags like <data> or <doc> as delimiters, and their presence does not interfere with the caching mechanism or API validation.

  • ✓

    The content marked for caching is significantly below the 1024-token minimum requirement.

    Why this is correct

    The exhibit shows a very small CSV and a short sentence, totaling only a few dozen tokens. Since Anthropic requires a minimum of 1024 tokens for a block to be eligible for caching, the cache_control flag will effectively be ignored or cause an error depending on the implementation.

  • ✗

    The messages array contains two separate text objects within a single user role.

    Why it's wrong here

    Anthropic's Messages API allows for content to be an array of multiple blocks, including multiple text blocks or a mix of text and images. This structure is perfectly valid and is often necessary when applying different metadata, like caching, to specific portions of a single message turn.

About these practice questions

One of 259 original CCAO-F practice questions on Courseiva, each with a full explanation and wrong-answer analysis — not exam dumps or protected exam content. Learn why practice questions differ from exam dumps →

How Courseiva writes practice questions · Editorial policy

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.