We recently published a cookbook for constrained decoding here: https://nanonets.com/cookbooks/structured-llm-outputs/