Courseiva

CCAO-F Prompting and Context Engineering Practice Question

A developer needs Claude to output data in a strict JSON format for an automated pipeline. Even with clear instructions, the model occasionally adds conversational filler like 'Here is the JSON:' before the code block. What is the most reliable way to prevent this?

⚠ Common exam trap

Candidates waste time trying to eliminate conversational filler solely through negative prompting, forgetting that instructions alone cannot reliably override model tendencies.

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

✓

Use the 'prefill' technique by starting the Assistant message with '{'.

Prefilling the assistant response is a powerful technique to guide Claude's output. By starting the assistant's turn with the opening character of the desired format (e.g., '{'), the model is forced to continue the sequence from that point, effectively bypassing its tendency to provide conversational introductory text.

Answer analysis

Option-by-option breakdown

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

  • ✗

    Increase the frequency penalty to prevent common words.

    Why it's wrong here

    Frequency penalties discourage the model from repeating the same tokens, but they do not effectively target specific conversational patterns or introductory phrases. Relying on penalties can also negatively impact the quality of the JSON itself by discouraging necessary repeating characters like brackets or quotes.

  • ✓

    Use the 'prefill' technique by starting the Assistant message with '{'.

    Why this is correct

    Starting the assistant's message with a curly brace forces Claude to complete the JSON object directly. Since the model generates text sequentially, providing the first character of the desired response eliminates the opportunity for the model to include any preamble or introductory sentences before the data.

  • ✗

    Wrap the instructions in triple backticks and capital letters.

    Why it's wrong here

    While formatting instructions clearly is helpful, using capitalization or backticks does not fundamentally change the model's conversational nature. Claude may still include introductory text because its training emphasizes helpfulness, which often includes explaining what it is about to provide to the user.

  • ✗

    Switch the model from Claude 3.5 Sonnet to Claude 3 Haiku.

    Why it's wrong here

    Model selection does not inherently solve the problem of conversational filler. While different models have different styles, the tendency to provide helpful introductions is common across the entire Claude 3 family. Prefilling remains the standard technical solution for this specific formatting requirement.

About these practice questions

This CCAO-F question is part of Courseiva's 259-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 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.