AlgoViz

Structured output and validation

medium 6 min

A structured response passes through several gates.

Trace the example

Follow the evidence through each stage, then test a change in the case.

A valid refund object can still be wrong

A valid refund object can still be wrong. Selected component: Candidate record inside Generator.
Open full-size diagram

Generator

amount = 42 · USD

The model returns an object in the requested shape. Syntax is only the first boundary.

The amount is a valid positive number. Can a successful schema check prove it is the receipt total?