Courseiva

CCDV-F Prompt and Context Engineering Practice Question

A developer needs Claude to transform a list of product descriptions into a fixed XML schema that a downstream parser expects. The model sometimes adds a friendly introductory sentence before the XML. Which change most directly eliminates the extra prose?

⚠ Common exam trap

The trap here is reaching for a generation parameter like temperature to fix a formatting problem that is actually solved by an explicit output constraint.

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

✓

Add a clear instruction that the response must begin immediately with the opening XML tag and contain nothing else.

Explicit output-format constraints are the direct fix for unwanted preamble. Telling the model exactly where the response must begin, and that nothing may precede it, removes the ambiguity that lets conversational framing leak in. Temperature, input length, and added reasoning all fail to target the specific behavior.

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 clear instruction that the response must begin immediately with the opening XML tag and contain nothing else.

    Why this is correct

    A direct, explicit constraint on where the output starts is the most reliable way to suppress preamble. The model follows concrete formatting rules well when they are stated unambiguously and placed with the other output requirements. This addresses the exact failure mode without changing the task itself.

  • ✗

    Shorten the input descriptions so the model has less to respond to.

    Why it's wrong here

    Input length is unrelated to whether the model prepends a greeting. Trimming descriptions could remove information the XML needs and would not change the tendency to add conversational framing. The formatting issue must be fixed by constraining the output, not the input.

  • ✗

    Increase temperature so the model varies its phrasing and may omit the introduction.

    Why it's wrong here

    Raising temperature increases randomness, which makes formatting less predictable, not more. The model might omit the preamble on one run and add a longer one on the next. For strict output contracts, lower randomness plus explicit rules is the direction that improves compliance.

  • ✗

    Ask the model to explain each transformation step before producing the XML.

    Why it's wrong here

    Requesting an explanation makes the extra prose intentional and guaranteed, which is the opposite of the goal. Reasoning can help complex tasks, but when the downstream parser requires pure XML, any visible reasoning before the payload breaks the contract. If reasoning is needed, it must be separated from the final output.

About these practice questions

This CCDV-F question is part of Courseiva's 257-question bank — original exam-style content with full explanations and wrong-answer analysis, never real exam questions or exam 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 CCDV-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 CCDV-F exam.