Prompt Engineering & Structured Output Quiz - Certifications Claude Architect Foundations
Free practice quiz: Prompt Engineering & Structured Output (Certifications Claude Architect Foundations). 77 multiple-choice questions with answers and explanations. Play online, no sign-up needed.
Play all 77 questions freeSample questions
What is the most likely reason the instruction 'only report high-confidence findings' did not improve precision?
- The confidence guidance lacks report categories, so it uses its own criteria.
- The reviewer receives too much code at once and cannot focus on the correct issues.
- The model ignores the instruction because it cannot apply confidence thresholds.
- The prompt does not require reasoning before the model reports each finding.
Show answer
Answer: A. The confidence guidance lacks report categories, so it uses its own criteria.
Precision improves when the prompt specifies categorical report/skip criteria, not when it asks the model to be conservative or highly confident. Without named categories, the model keeps applying its own judgment to the same noisy findings.
The schema requires quantity, unit, and shipping_date. Detailed schema instructions still produce null quantity in 14% of documents when sources say 'two dozen' or 'half a pallet', and sometimes the model invents a shipping_date when the document only says 'ships next week'. Downstream systems reject these records. Which change most directly reduces both empty extraction and hallucinated values for these informal and varied documents?
- Set model temperature to zero and require a confidence score next to each extracted field.
- Preprocess every document into a single normalized layout before sending it to the model.
- Add few-shot examples that normalize informal measures, handle varied layouts, and leave unsupported dates null.
- Add JSON Schema required and numeric type constraints so empty or non-numeric quantity values are rejected during validation.
Show answer
Answer: C. Add few-shot examples that normalize informal measures, handle varied layouts, and leave unsupported dates null.
Few-shot examples reduce hallucination in extraction because they demonstrate how to interpret informal measurements and when to emit null for unsupported dates. The examples teach the model that 'two dozen' maps to a normalized quantity, while 'ships next week' lacks a concrete shipping_date and should remain null.
What is the most likely root cause of the downstream rejections?
- The schema did not mark item_amount and total as required, so some records were missing those fields.
- strict: true was not enabled on the tool definition, so invalid syntax is still passing through schema validation.
- The schema enforces JSON shape and field types but does not enforce cross-field business rules such as line-item totals.
- The extraction tool used tool_choice 'auto', so the model sometimes returned unstructured text instead of tool calls.
Show answer
Answer: C. The schema enforces JSON shape and field types but does not enforce cross-field business rules such as line-item totals.
Strict JSON schemas via tool use eliminate syntax and type errors, but they do not prevent semantic errors such as totals that do not match line items or values placed in the wrong fields. Those issues require downstream validation or additional normalization rules.
What is the most effective change to the repair step?
- Append each specific validation message with its field path and source file to the repair prompt to target the correction.
- Increase the repair step's temperature and token limit to explore more possible extractions before returning a result.
- Use strict tool calling with an input_schema that requires framework_version to prevent schema violations on retries.
- Delete any field that fails validation in post-processing and let downstream systems treat the value as missing.
Show answer
Answer: A. Append each specific validation message with its field path and source file to the repair prompt to target the correction.
The generic repair prompt hides the specific reasons for failure, so the model cannot localize the correction. Appending the exact validation errors guides a targeted retry. Strict tool use can prevent schema syntax errors but cannot correct semantic extraction failures like missing or incorrectly normalized values.
What is the most effective change for future claim batches?
- Create a composite custom_id from claim_number and policy_year, such as claim_number:policy_year, so each request id is unique and results map to source records.
- Split the batch into smaller batches of 1,000 claims and continue using claim_number as custom_id to prevent duplicate values from appearing within each smaller batch.
- Remove custom_id entirely and match every returned result to the original input array by using the request index from the batch submission file, without relying on ids.
- Keep claim_number as custom_id and rely on the order of the returned results because the Batches API preserves input order for requests with the same custom_id.
Show answer
Answer: A. Create a composite custom_id from claim_number and policy_year, such as claim_number:policy_year, so each request id is unique and results map to source records.
The custom_id field is the correlation mechanism for batch request/response pairs, and it must be unique per request to make results unambiguous. A composite key preserves business meaning while guaranteeing uniqueness, whereas result order is not guaranteed and splitting batches does not remove duplicate claim_number values across policy years.