Courseiva

CCAO-F Prompting and Context Engineering Practice Question

Which TWO techniques should you employ to optimize the performance of Claude 3.5 Sonnet when processing long, complex documents for extraction tasks?

⚠ Common exam trap

Candidates often try to 'summarize' long documents in one go. They fail to realize that forcing a structured JSON output and using XML delimiters are necessary for reliability.

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

✓

Wrap the document content in XML tags such as <document_content> to clearly delineate context.

Effective extraction from long documents requires minimizing noise and guiding the model through the structure of the input. By using XML tags, you provide semantic boundaries that help the model parse the document accurately. Additionally, specifying the exact JSON output format forces the model to adhere to a schema, reducing the need for post-processing and ensuring the extracted data is immediately usable by downstream enterprise applications.

Answer analysis

Option-by-option breakdown

For each option: why learners choose it and why it is or isn't the right answer here.

  • ✗

    Pre-process the document to remove all whitespace and newlines to save tokens.

    Why it's wrong here

    Removing whitespace often degrades the model's ability to interpret structural relationships within the text. Modern LLMs are trained on natural language patterns, and stripping formatting makes it significantly harder for the model to understand headings, lists, and hierarchical data, which are crucial for high-quality extraction tasks.

  • ✓

    Wrap the document content in XML tags such as <document_content> to clearly delineate context.

    Why this is correct

    XML tags are highly effective for grounding Claude's attention. They provide a clear visual and structural delimiter that helps the model distinguish between instructions and the data being analyzed. This significantly improves accuracy when extracting specific entities or summarizing long content, as the model explicitly identifies the content boundaries.

  • ✗

    Provide the document as a single long string without any structural markers or metadata.

    Why it's wrong here

    Providing raw strings without structural metadata forces the model to infer context, which introduces unnecessary risk and ambiguity. Structured input allows the model to leverage its capability to identify patterns, making it much more reliable at extracting information consistently across varied document types and complex nested data structures.

  • ✓

    Use a system prompt that explicitly defines the expected JSON schema for the extraction output.

    Why this is correct

    Enforcing a JSON schema in the system prompt is the standard practice for structured data extraction. It provides a clear target for the model, ensuring that the response contains only the requested fields in the correct format. This reduces the need for regex parsing and improves integration reliability.

  • ✗

    Instruct the model to ignore the first 20% of the document to ensure it focuses on relevant information.

    Why it's wrong here

    Instructing the model to ignore parts of the input is counter-productive, as relevant information could exist anywhere in the text. Claude is capable of long-context retrieval, and arbitrary truncation of data risks missing critical information that may be essential for a complete and accurate extraction result.

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.