Valid structure is not evidence of a valid decision.
A response can pass format checks and still produce the wrong regulated or policy outcome. Schema validation controls syntax; it does not validate reasoning.
We tested five ways of asking the same model to apply the same policy. Better prompts and richer schemas improved the result, but none made generated reasoning dependable. The only design with zero wrong decisions separated the work: the model extracted facts, deterministic code applied policy, and the model narrated the result.
A malformed response is easy to detect. The harder governance problem is a fluent answer that follows the schema, agrees with itself and applies the policy incorrectly.
A response can pass format checks and still produce the wrong regulated or policy outcome. Schema validation controls syntax; it does not validate reasoning.
Fields labelled as checks or reasons may reflect the same underlying holistic guess. They should not be treated as independently verified control evidence.
The most reliable design used fewer tokens than every scratchpad approach. The architecture improved quality and efficiency together.
Grammar enforcement maintained valid, ordered output as schemas became complex. It did not change which decision the model reached.
Schema-only failures confidently approved ineligible cases. The deterministic pipeline converted extraction uncertainty into a route for human review.
The result was not achieved by another prompt instruction. It came from assigning different work to the model and to deterministic software.
A validators-first schema reached 82.6% decision accuracy. Adding explicit working improved some cases but plateaued below 90%. Moving the policy decision into deterministic code produced 10,000 correct decisions from 10,000 runs in the bounded evaluation.
Throughout the study, the model extracted information from the data set near-perfectly. Narration remained consistent with the chosen outcome. The unreliable middle was policy computation: sums, threshold bands, boundary conditions and combinations of predicates.
Schemas should capture facts. Code should apply policy.
The model reads the customer’s message and explains the result. Deterministic software performs the decision that must be repeatable and auditable.
The error was concentrated in cases requiring multiple prices to be added before comparison with a limit. Directly stated over-limit totals were handled almost perfectly; multi-part totals were not computed before the first decision field was emitted.
On four scenarios, an ineligible customer was booked 400 times out of 400. The model returned the expected fields, used the expected reason code and wrote a response fully consistent with its own wrong decision.
Confidently incorrect bookings across the concentrated failure scenarios.
{
"criteria_met": true,
"reason_code": "eligible",
"action": "book_appointment",
"response_text": "I can help arrange that for you."
}
// JSON valid ✓
// Required fields ✓
// Internally aligned ✓
// Policy decision ✕A system that checks only parsing, required keys and agreement between response text and action would approve this output. The control has to validate the decision itself—not merely its presentation.
Adding a calculation field before the decision repaired the obvious arithmetic failures. Clear multi-part over-limit cases moved from 0% to 99.5% correct because the model was now required to write down the sum.
But classification into the intermediate policy band remained unstable. The model could calculate £6,500 + £4,250 = £10,750 correctly and still assign the harshest category instead of the reduced-scope alternative.
Written arithmetic repaired the failure it directly exposed.
The sum was right while the policy band was wrong.
Up from 81 tokens for the baseline design.
The fourth design represented every policy predicate as a required field: extracted age, extracted total and one boolean for each threshold comparison. It produced the best schema-only result—and the clearest evidence that generated fields should not be treated as independently computed checks.
Age extracted → total calculated → £10,000 comparison → £12,000 comparison → action selected.
Fields copied one another, absorbed the overall verdict and sometimes disagreed with the action they supposedly determined.
The £12,000 comparison matched the £10,000 comparison, even when their true answers differed.
Runs where the two comparisons should differ but were emitted identically.
The final action did not reliably follow the model’s own preceding booleans.
Decision accuracy was effectively unchanged with and without grammar enforcement in every design. Its value emerged as schemas became more complex: it guaranteed parseable structure and field order when unenforced generation began to degrade.
On the more complex unenforced schemas, validity fell to 97.9%—approximately one malformed response in fifty. The measured throughput cost of enforcement was approximately 10–20%. It remains necessary infrastructure; it simply solves a different problem.
The final design removed the decision from the model - this is the format process used within our own agent pipelines. The same model extracted bounded facts, approximately twenty lines of deterministic code applied the policy, and the model wrote the customer-facing response from that result.
Every scenario that had failed catastrophically—multi-part sums, band boundaries and the exact age boundary—reached 200 correct decisions from 200 runs.
When extraction was uncertain during development, the code could route the thread to human review. Schema-only designs instead produced a fluent, confident answer from a wrong decision.
A recurring extraction slip read “£9,950” as “£9,990” on one prompt. The fix is a source-grounding check: verify that every extracted number appears in the original message. The remaining risk is local, observable and testable.
Customer age, stated prices, requested date and requested time. The model is forbidden from deciding or summing.
Sum values, test both thresholds, check age bounds, normalise dates and select the defined action.
Generate a natural response from the code-owned action and reason, without reopening the decision.
The experiment does not argue against language models or structured outputs. It defines where each belongs in a dependable system.
Parsing and field checks are interface controls. Test policy decisions separately against known-correct outcomes.
If a field matters to the decision, compute or verify it independently before treating it as audit evidence.
Use code for arithmetic, thresholds, eligibility, dates, idempotency and other rules that must be repeatable.
Language models are effective at extracting facts and producing natural responses when the decision boundary is controlled elsewhere.
Extraction checks and explicit escalation should stop incomplete facts from becoming confident customer-facing actions.
Model metrics alone are insufficient. Test extraction, code, narration and handoff behaviour together across boundaries and regressions.
The customer messages, policy and model were held constant. The constrained condition provides the comparable decision scores below; the unenforced condition isolates schema validity.
| Output design | Decision correct | Fully correct | Schema-valid unenforced | Response consistent | Tokens / eval |
|---|---|---|---|---|---|
| 1. Prompt + validators-first schema | 82.6% | 81.8% | 100.0% | 99.9% | 81 |
| 2. + Calculation scratchpad | 88.1% | 87.6% | 98.5% | 99.2% | 128 |
| 3. + Decomposed limit gate/tier | 85.7% | 85.5% | 97.9% | 99.8% | 135 |
| 4. + Full predicate table | 89.7% | 89.7% | 97.9% | 99.6% | 166 |
| 5. Extract → code decides → narrate | 100.0% | 100.0% | 100.0% | 99.8% | 97 |
“Fully correct” requires the action, reason code, criteria flag and appointment outcome all to be correct. Enforced decoding held validity at effectively 100% across all designs; the validity column reports the corresponding unenforced condition. Rounded values are shown.
One model, one server, fixed prompts and a known-correct policy. Only the structure of the requested output and the use of enforced decoding changed between conditions.
Instruct model served through one vLLM environment.
Customer messages with independently verified expected outcomes.
Generations per message, per condition, at temperature 0.7.
Five designs, each tested with and without enforced decoding.
Differences were tested using Fisher’s exact test by scenario group. The full technical write-up contains scenario-level results, hypotheses, statistical comparisons and implementation detail.
Want to run the evaluation yourself? Contact our team and we'll fork the repo.
For decisions that must be repeatable, explainable and safe at the boundary, the right question is not how to make the model reason harder. It is which parts of the work should never have been probabilistic.