Courseiva

CCAO-F Prompting and Context Engineering Practice Question

You are designing a system to extract structured JSON from unstructured emails. Despite providing a clear schema in the system prompt, Claude occasionally ignores the formatting constraints and includes conversational filler. Which technique best improves instruction adherence?

⚠ Common exam trap

Candidates provide complex JSON schemas in plain text, which the model often treats as suggestions rather than hard constraints, leading to inconsistent outputs mixed with conversational text.

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

✓

Enclose the schema within XML tags and instruct Claude to output only the content within those tags.

Utilizing XML tags like <format> or <json_schema> creates a distinct boundary that prevents the model from blending instructions with content. This structural separation helps Claude maintain strict adherence to output requirements by isolating the task logic from the input data. Mastery of delimiters is essential for building reliable, production-grade pipelines that require consistent, machine-readable outputs for downstream 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.

  • ✗

    Add a few examples of conversational responses in the prompt.

    Why it's wrong here

    Adding examples of conversational responses will likely encourage the model to continue the conversational style rather than suppressing it. This approach reinforces the undesirable behavior by providing the model with patterns that contradict the strict requirement for raw JSON-only output in the system prompt.

  • ✗

    Reduce the total prompt length to minimize cognitive load.

    Why it's wrong here

    Reducing prompt length does not address the underlying issue of instruction adherence regarding formatting. While concise prompts are generally beneficial, the model needs explicit structural cues to distinguish between instructions and the target schema. Length reduction alone will not force the model to omit conversational elements.

  • ✓

    Enclose the schema within XML tags and instruct Claude to output only the content within those tags.

    Why this is correct

    XML tags provide a clear hierarchy that helps Claude distinguish between meta-instructions and task requirements. By explicitly telling the model to output only the content within the tags, you create a rigid constraint that significantly reduces the likelihood of the model appending conversational filler to the final output.

  • ✗

    Increase the temperature setting to allow for more creative adherence.

    Why it's wrong here

    Increasing the temperature introduces randomness and variability, which is counterproductive for tasks requiring strict structured output. Lower temperatures are preferred when you need the model to follow a rigid schema exactly as defined, as higher variance increases the probability of straying from the specified JSON format.

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.