Quiz 14 Question 3 of 20

Your team needs Claude to reliably output structured JSON for a downstream parser that has zero tolerance for malformed responses. Despite clear instructions and examples, Claude occasionally outputs JSON with trailing commas or explanatory prose before the JSON block. What is the most reliable engineering approach to enforce output format?

Select an answer to reveal the explanation.

Motivation