CCAR-P Advanced Agentic Architecture Practice Question
You are building a customer-support agent with Claude that must call a lookup_order tool, then a refund_order tool that depends on the order's status. During testing, the agent sometimes calls refund_order before the lookup_order result returns. Which change to your orchestration loop best enforces the required ordering?
⚠ Common exam trap
The trap here is assuming that listing tools together or forcing tool use will make the model respect dependencies, when only gating tool availability on prior results can guarantee ordering.
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
✓
Expose only lookup_order until its result is returned, then add refund_order to the tools array for the subsequent request.
Deterministic ordering is achieved by controlling what the model can do at each step, not by prompting harder. Withholding the dependent tool until the prerequisite result is in the conversation removes the failure mode entirely, because the model cannot select a tool absent from the current tools array. This makes the dependency a property of the orchestration state machine rather than of model compliance.
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 max_tokens value so the model has more room to reason about the correct order before calling tools.
Why it's wrong here
max_tokens controls the length of generated output, not the correctness of tool sequencing. A larger budget may even let the model ramble before emitting the same premature refund call. Ordering failures stem from which tools are available and what state the model sees, not from truncation, so raising this limit addresses a symptom that is not the cause.
- ✓
Expose only lookup_order until its result is returned, then add refund_order to the tools array for the subsequent request.
Why this is correct
By withholding refund_order from the tools array until the lookup_order result is present in the conversation, the orchestration layer makes the premature call impossible rather than merely discouraged. The model cannot invoke a tool it was not offered. This state-gated tool exposure enforces the dependency deterministically while keeping the loop simple and auditable.
- ✗
Include both tools in the same request's tools array and let the model choose the call order.
Why it's wrong here
Providing both tools in one request leaves sequencing to the model's next-token predictions, which is exactly what produced the out-of-order refund call. The tools array advertises capabilities; it does not encode dependency constraints. Without a state check that blocks refund_order until a lookup_order result exists, the agent can still emit the refund call prematurely.
- ✗
Set tool_choice to force a tool call on every turn so the agent never stalls between lookup and refund.
Why it's wrong here
Forcing a tool call each turn pushes the model to act even when it lacks the lookup result, which increases the chance of calling refund_order with fabricated or missing data. tool_choice constrains whether a tool is called, not which one or in what order. It cannot express a dependency and will make the ordering problem worse.
About these practice questions
This CCAR-P question is part of Courseiva's 262-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 CCAR-P 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-P exam.