Courseiva

CCAR-P Advanced Agentic Architecture Practice Question

You are building a Claude-based agent that must parse unstructured customer emails, extract line-item order data, and then call a fulfillment tool with the extracted values. During testing, the agent occasionally calls the fulfillment tool with empty or garbled line items when an email contains a forwarded message with a different formatting style. Which architectural change most directly reduces this failure?

⚠ Common exam trap

The trap here is assuming that a larger output budget or a simpler tool interface will fix malformed extractions, when the actual defect is the absence of a validation boundary before tool invocation.

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

✓

Add a validation step that checks the extracted line items against the tool's JSON schema and returns a structured error to the model before any tool call is allowed.

The failure occurs because extracted line items are not verified before the tool boundary is crossed. A validation gate that compares the extraction against the tool's JSON schema and returns a structured error gives the model a chance to repair its output. This keeps invalid data out of downstream systems and converts a silent corruption into a retryable, observable event.

Answer analysis

Option-by-option breakdown

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

  • ✗

    Reduce the number of tools available to the agent so it focuses only on fulfillment during extraction.

    Why it's wrong here

    Tool count affects selection confusion, not the correctness of extracted fields. The failure is about the content of the payload, not about the agent choosing the wrong tool. Limiting tools would not prevent empty or garbled line items from being passed. It also removes capabilities the agent may legitimately need in the same workflow, adding constraint without solving the extraction defect.

  • ✓

    Add a validation step that checks the extracted line items against the tool's JSON schema and returns a structured error to the model before any tool call is allowed.

    Why this is correct

    A schema validation gate on the extracted payload catches malformed or empty line items before the fulfillment tool is invoked. Returning a structured error to the model lets it re-read the email and repair the extraction. This addresses the root cause of garbled output rather than masking it, and it keeps the tool boundary safe from invalid inputs. It is the most direct architectural fix for the described failure.

  • ✗

    Switch the fulfillment tool to accept free-form natural language instead of structured parameters so the model can pass whatever it extracted.

    Why it's wrong here

    Loosening the tool's input contract moves the parsing burden downstream and makes failures harder to detect. Free-form input would let garbled extractions flow into fulfillment without any schema check, which is the opposite of what is needed. Structured parameters exist precisely so invalid data can be rejected early. This change increases the blast radius of extraction errors.

  • ✗

    Increase the max_tokens parameter on the extraction call so the model has more room to emit complete line items.

    Why it's wrong here

    Raising max_tokens only helps when output is being truncated. In this scenario the extraction is garbled or empty because of formatting variability in forwarded messages, not because the response hit a token ceiling. More output budget would simply allow the model to produce more incorrect content. It does not add a validation or repair loop, so the tool can still be called with bad data.

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 →

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 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.