Courseiva

CCAO-F Prompting and Context Engineering Practice Question

A developer is optimizing a customer support bot that uses a 50,000-token knowledge base in every request. They want to implement Prompt Caching to reduce costs and latency. Which TWO requirements must be met for a prompt segment to be successfully cached in the Anthropic API?

⚠ Common exam trap

Candidates often assume prompt caching is automatically applied to all large prompts, forgetting that it requires explicit opt-in via the 'cache_control' parameter and meets specific token minimums.

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 segment intended for caching must contain at least 1024 tokens.

Prompt caching is a powerful feature for large contexts, but it requires specific implementation details. The segment to be cached must be at least 1024 tokens and must be explicitly marked with the cache_control metadata. Understanding these technical thresholds is vital for developers looking to scale high-token applications while maintaining cost-efficiency and low latency.

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 segment intended for caching must contain at least 1024 tokens.

    Why this is correct

    Anthropic enforces a minimum size for cacheable blocks to ensure the overhead of caching provides a meaningful performance benefit. Small snippets of text do not qualify for caching because the resource management required would outweigh the speed gains, making the 1024-token floor a critical architectural constraint.

  • ✗

    The cached content must be placed at the very end of the user message.

    Why it's wrong here

    Caching usually targets the beginning or middle of a prompt, such as the system instructions or the knowledge base. Placing cached content at the end is counter-productive because any change in the preceding text would invalidate the cache, as caching works from the top-down in the prompt sequence.

  • ✓

    The developer must include 'cache_control': {'type': 'ephemeral'} in the message block.

    Why this is correct

    Explicitly marking blocks for caching is required by the API. The 'cache_control' attribute tells the Anthropic infrastructure exactly which parts of the prompt should be persisted in the cache. Without this specific metadata, the model will process the entire prompt as a standard, non-cached request every time.

  • ✗

    The system prompt must be empty when using cached blocks in the user message.

    Why it's wrong here

    System prompts can coexist with cached user messages and are often the primary candidates for caching themselves. There is no requirement for an empty system prompt; in fact, caching the system prompt along with a large reference document is a standard best practice for optimizing Claude's performance.

  • ✗

    The temperature setting must be set to 0.0 for the cache to remain valid.

    Why it's wrong here

    Temperature settings affect the randomness of the output generation but do not impact the validity or storage of the prompt cache. Caching is concerned with the input processing stage, while temperature is a parameter for the sampling stage, meaning they function independently within the API request lifecycle.

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 →

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.