Added
A finance assistant must return machine-validated output containing exactly three fields: decision, rationale, and policy_ids. The decision must be one of approve, reject, or review; policy_ids must be an array; and no prose may appear outside the structure. The application will parse the response before showing it to an analyst, and a parsing failure must be rare. Which prompt design is the best choice?
An explicit schema and constrained field values make the output contract unambiguous, while the instruction to emit only JSON avoids surrounding prose that would break parsing. A general request to include fields does not enforce types or exact structure. Markdown tables are not JSON and can vary in formatting. Long free-form explanations make regex extraction brittle and can introduce text outside the required fields.