Claude Certified Architect – Foundations Practice Question 85: Classification Fallback Label

Claude Certified Architect, Foundations · Test 9 · question 5 of 10

Prompt Engineering & Structured Outputmedium

A support platform routes tickets with Claude into one of six queues. The prompt lists the queues, but Claude sometimes returns labels such as "billing question?" or "general feedback" that downstream code cannot route, and ambiguous tickets get forced into the wrong queue. The team wants every response to be routable and ambiguous tickets to be handled safely. What should they do?

Select one answer
Show answer and explanation

Answer:

  • C. Constrain the label to an enum of the six queues plus an explicit "other" value, and send "other" to human triage

C is correct. A JSON schema (for example through structured outputs with output_config.format) can restrict the label field to an enum, so every response contains one of the allowed values. Including an explicit fallback such as "other" or "unclear" gives the model a legitimate choice for ambiguous tickets instead of forcing a wrong queue, and routing that value to humans handles them safely. Compare enum values case-insensitively, since capitalization is not guaranteed.

A is wrong because fuzzy matching hides the problem and can map an ambiguous ticket to the wrong queue with no signal. B is wrong because assistant prefill is rejected with a 400 error on Claude 4.6 and later models, and it would not restrict the label values anyway. D is wrong because temperature adds randomness and does nothing to constrain output to a fixed label set.

Reference: Structured outputs - Claude API Docs

Practice Test 9 ›

Study guides for Claude Certified Architect, Foundations