Courseiva
Claude Model Fundamentals →mediumMultiple Choice

CCAO-F Claude Model Fundamentals Practice Question

A data engineer is using Amazon Bedrock to invoke Claude 3 Haiku for classifying customer feedback into categories. They notice that the model sometimes returns categories that are not in the predefined list. Which change to the prompt is most likely to improve adherence to the allowed categories?

⚠ Common exam trap

The trap here is thinking that lowering max_tokens or adding stop sequences can enforce a category list, when only prompt-level guidance like few-shot examples reliably shapes label selection.

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

✓

Provide a few-shot examples in the prompt showing correct classifications for similar feedback, including the exact category labels.

Few-shot examples in the prompt show Claude the exact category labels and the expected format, which significantly improves adherence to a predefined set. By demonstrating correct classifications, the model learns the pattern and is less likely to invent new categories. Other parameters like temperature, stop sequences, and max_tokens affect randomness, truncation, and length, but do not teach the model which labels are valid.

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 temperature to 1.0 so Claude explores more creative category assignments.

    Why it's wrong here

    Higher temperature increases randomness and creativity, which would make Claude more likely to produce unexpected or invalid categories. For classification tasks where strict adherence to a label set is required, lower temperature is generally preferred. Increasing temperature works against the goal of consistent, constrained output. It does not help the model respect the predefined list.

  • ✗

    Add a stop sequence that matches the first invalid category so Claude stops generating when it deviates.

    Why it's wrong here

    Stop sequences halt generation when a specific string is produced, but they do not guide the model toward valid categories. If Claude starts generating an invalid category, a stop sequence might truncate the response, but the output would still be incomplete or incorrect. Stop sequences are useful for controlling format, not for enforcing a set of allowed labels. They do not teach the model which categories are valid.

  • ✗

    Reduce the max_tokens parameter so Claude has less room to generate invalid categories.

    Why it's wrong here

    max_tokens limits the total length of the response. Reducing it might truncate output, but it does not prevent the model from choosing an invalid category. A short response can still contain a wrong label. The parameter controls length, not content. It is not a mechanism for constraining classification to a predefined set. Prompt engineering, such as few-shot examples, is the appropriate fix.

  • ✓

    Provide a few-shot examples in the prompt showing correct classifications for similar feedback, including the exact category labels.

    Why this is correct

    Few-shot examples demonstrate the desired input-output mapping and reinforce the exact category labels. Claude learns from the pattern and is more likely to output only the allowed categories. This is a prompt engineering technique that improves adherence without changing model parameters. Including examples that cover edge cases and explicitly show the format helps the model generalize correctly to new feedback.

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.