The result we did not want
Grammar-constrained decoding did not reduce hallucination.
Forcing the model to emit JSON that matches the claim
schema is the standard fix. Measured over ~500 claims per arm it made no
difference: 8.2% constrained against 6.5% free,
z = 1.06,
p = 0.29, with confidence intervals
overlapping across most of their range — at 7.5× the decoding
time.
What the grammar does buy is a guarantee: it
cannot emit a claim that fails the schema, where free decoding merely
happened not to. In a caregiver-facing system that is worth paying for. It is not
a faithfulness result, and it is not written up as one.
An earlier run put the constrained arm
at 39.9%. That figure was our own prompt: the model was never shown the shape of
the JSON it was being scored against, so it lost claims for guessing an envelope
nobody had described to it.