CCAR-F Prompt Engineering and Structured Output Practice Question
A company wants to prevent Claude from answering questions outside the scope of their internal knowledge base. Which prompt engineering strategy is most effective for enforcing this constraint?
⚠ Common exam trap
Candidates often assume that simply stating 'only use the provided files' is sufficient, failing to include a specific negative constraint or a fallback response for out-of-scope queries.
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
✓
Set strict boundary instructions in the system prompt.
Negative constraints and grounding instructions in the system prompt are essential for maintaining scope. By explicitly telling the model to decline questions not covered by the provided context and providing a specific 'out-of-scope' response phrase, the developer can reliably control the model's boundary behavior and reduce hallucinations.
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 top-p value to allow more diverse answers.
Why it's wrong here
Increasing top-p allows the model to consider a wider range of tokens, which actually increases the likelihood of the model answering out-of-scope questions or hallucinating information. This parameter should be lowered, not increased, if the goal is to restrict the model to a specific set of facts.
- ✗
Use few-shot examples of Claude answering general knowledge.
Why it's wrong here
Providing examples of the model answering general knowledge would have the opposite of the desired effect, as it would signal to Claude that it is acceptable to go beyond the internal knowledge base. Examples should instead demonstrate the model politely refusing to answer questions not found in the documents.
- ✗
Include explicit 'stay in character' instructions in the user message.
Why it's wrong here
While instructions in the user message are helpful, they are less fundamental than system-level constraints. Relying solely on user messages for scope control is less robust because the system prompt is intended to be the primary place for governing the model's core behavioral boundaries and limitations.
- ✓
Set strict boundary instructions in the system prompt.
Why this is correct
The system prompt is the ideal location for establishing 'guardrails' and boundary conditions. By instructing the model to only use the provided context and to state 'I do not have information on that' for other topics, you create a robust mechanism for ensuring the model stays on-task.
About these practice questions
Courseiva writes every CCAR-F question from scratch — 271 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 →
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 CCAR-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 CCAR-F exam.