Rubric
Contents — domains, guide and mocks

Prompt Engineering & Structured Output

CCAR-F · Domain 422 questions · 20% of the exam

Answer everything, then check. Each result links back to the lesson for the objective it came from.

0 of 22 answered0:00
  1. Question 1 · 4.1

    A retailer’s CI pipeline runs Claude to review every pull request. Engineers report that most comments are about variable naming, missing docstrings and possible null values that the type checker already rules out, and they have started ignoring the bot.

    Which change most directly improves precision without losing real bug reports?

  2. Question 2 · 4.1

    A hospital triage assistant labels incoming patient-portal messages as urgent or routine. Staff find that messages with words like “severe” or “emergency” are always marked urgent, even when they describe an old, resolved problem.

    What should the prompt add?

  3. Question 3 · 4.1

    An insurer uses Claude to flag claims that may need a fraud review. The team wants fewer false alarms but cannot afford to miss genuine cases.

    Which two design choices fit that goal? (Select 2.)

  4. Question 4 · 4.2

    An insurer’s claim classifier has a detailed system prompt defining each claim type. Reviewers find it consistently puts storm-damaged vehicles under “weather” one day and “motor” the next, depending on wording.

    What is the most effective next step?

  5. Question 5 · 4.2

    An extraction prompt pulls invoice fields from supplier PDFs. All four examples in the prompt show complete invoices. On invoices with no purchase-order number, the model sometimes returns a plausible-looking but invented PO number.

    Which change addresses the cause?

  6. Question 6 · 4.2

    An internal IT agent calls a create_ticket tool. Calls are valid JSON, but dates arrive in three different formats and the optional reporter object is filled in with guessed values.

    Which two changes are most appropriate? (Select 2.)

  7. Question 7 · 4.3

    A claims pipeline asks Claude to “respond only with valid JSON” describing each claim. Roughly one response in fifty has a sentence before the JSON or a missing key, and the loader crashes.

    What is the most reliable fix?

  8. Question 8 · 4.3

    A mailroom agent receives invoices, receipts and purchase orders mixed together, unlabelled. There is a separate extraction tool for each type, and every document must produce structured data.

    Which tool_choice setting fits best?

  9. Question 9 · 4.3

    After moving to strict tool use, an extraction pipeline never produces malformed JSON. An audit finds that on contracts with no renewal date, renewal_date is filled with the signature date. The field is a required string.

    What change addresses the root cause?

  10. Question 10 · 4.3

    A strict JSON output response comes back with stop_reason of max_tokens. What should the application assume?

  11. Question 11 · 4.4

    A shipping company’s extraction pipeline validates each bill of lading. When the container count does not match the listed containers, it resends the same request, up to three times. Most failing documents fail all three attempts.

    What change will most improve the retry success rate?

  12. Question 12 · 4.4

    An HR system extracts employee start dates from signed offer letters. Some older letters were signed without a stated start date. The validator rejects records without a date and triggers a retry.

    How should the pipeline treat these letters?

  13. Question 13 · 4.4

    A bank extracts loan applications with a strict extraction tool, so every response matches the schema. Auditors find cases where monthly income exceeds annual income, and where the applicant’s name was taken from the referee section.

    Which two measures address these errors? (Select 2.)

  14. Question 14 · 4.4

    An Agent SDK run with output_format set ends with subtype error_max_structured_output_retries. What does this mean?

  15. Question 15 · 4.5

    A team runs two Claude workloads: a check that must pass before a pull request can merge, and an overnight job that summarises every support ticket from the previous day for a morning dashboard.

    Which assignment of APIs is most appropriate?

  16. Question 16 · 4.5

    A batch of 20,000 extraction requests ends with 19,640 succeeded, 300 errored with invalid_request_error, and 60 expired. The engineer’s first instinct is to resubmit the entire batch.

    What is the best next step?

  17. Question 17 · 4.5

    A compliance team must have each uploaded contract reviewed within 30 hours of upload. They want to use the Batches API to cut cost, and documents arrive at random times throughout the day.

    How often must they submit batches to guarantee the deadline?

  18. Question 18 · 4.5

    Why should each request in a batch carry a meaningful custom_id?

  19. Question 19 · 4.6

    An engineering team’s code-generation agent writes a module, then in the same conversation is asked “Review the code you just wrote for bugs.” It almost always reports no significant issues, yet human reviewers keep finding logic errors.

    What change is most likely to improve the review?

  20. Question 20 · 4.6

    A single-pass review of a 35-file pull request returns a handful of style comments and misses that a shared function’s return type changed while three callers were not updated.

    Which architecture best addresses this?

  21. Question 21 · 4.6

    A legal-tech company’s contract reviewer produces too many false positives, but lawyers insist it must not miss genuinely risky clauses.

    Which two design changes fit these goals? (Select 2.)

  22. Question 22 · 4.6

    Three independent instances extract the dosage of a high-risk drug from the same record. Two say 5 mg, one says 50 mg. What should the pipeline do?

You can change answers until you check. Nothing is saved or sent anywhere.