Large Language ModelsIntermediate6 October 2026
A task requires returning one of five approved labels. Which setup most improves output reliability?
Pick an answer to see the explanation.
Answer
Constrained structured output using an enum schema
An enum schema restricts valid outputs to the approved labels and supports deterministic validation. More tokens or higher sampling variability does not enforce the label contract.
Learn more: Explore the AI Foundations roadmap →