Constrained Decoding vs Post-hoc Validation: Production LLM Extraction Needs Both

Constrained decoding and post-hoc validation solve different problems. Constrained decoding is generation-time control: fewer malformed payloads less wrapper text better adherence to schema/tool shape Post-hoc validation is the trust boundary: coerce what is safe reject what is not attach confidence where routing matters A payload can be perfectly valid JSON and still be wrong for the workflo