CCAO-F Prompting and Context Engineering Practice Question
A team is building a pipeline where Claude must extract structured fields from invoices. They provide several examples of input and expected output in the prompt. The model performs well on formats similar to the examples but fails on a new invoice layout. Which adjustment best addresses this?
⚠ Common exam trap
The trap here is assuming more examples always help, when the real issue is that the examples lack diversity and cause the model to overfit one layout.
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
✓
Diversify the few-shot examples to cover multiple invoice layouts and edge cases.
Few-shot prompting works by demonstrating the desired mapping between inputs and outputs. When all examples share a single format, the model learns that format rather than the underlying task. Diversifying examples across layouts and edge cases teaches the general extraction behavior, which improves performance on new invoice structures.
Answer analysis
Option-by-option breakdown
For each option: why learners choose it and why it is or isn't the right answer here.
- ✗
Lower the temperature to 0 and keep the examples unchanged.
Why it's wrong here
Temperature affects randomness, not the model's ability to generalize from narrow examples. Even at temperature 0, Claude would still apply the same learned pattern and fail on the new layout. The fix requires broader example coverage, not a sampling change.
- ✗
Increase the number of examples to twenty, all using the same invoice layout.
Why it's wrong here
Adding more examples of the same layout reinforces the pattern the model already learned and does nothing for the unseen layout. Diversity, not volume, is what helps generalization, so this change would likely leave the failure on new invoice formats unresolved.
- ✗
Remove the examples and rely solely on a detailed instruction describing the fields.
Why it's wrong here
Removing examples discards the strongest signal for structured extraction. Instructions alone often leave ambiguity about field boundaries and formats. For tasks requiring precise output structure, examples are more effective than prose descriptions, so this change would likely reduce accuracy.
- ✓
Diversify the few-shot examples to cover multiple invoice layouts and edge cases.
Why this is correct
Few-shot examples teach patterns. If all examples share one layout, Claude overfits to it and struggles with new structures. Including varied layouts and edge cases exposes the model to the range of inputs it must handle, improving generalization to unseen invoice formats.
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 →
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.