Skip to content

Record guided generation as a measured negative about the engine - #2

Merged
asaptf merged 1 commit into
mainfrom
docs/guided-generation-measured-negative
Aug 10, 2026
Merged

Record guided generation as a measured negative about the engine#2
asaptf merged 1 commit into
mainfrom
docs/guided-generation-measured-negative

Conversation

@asaptf

@asaptf asaptf commented Aug 10, 2026

Copy link
Copy Markdown
Owner

Records the guided-generation experiment in DECISIONS.md under measured negatives, and corrects the now-outdated optimism in Future bridge notes.

Why the wording matters

The finding is that AnyLanguageModel 0.8.0's constrained JSON generator is unusable for extraction — not that constrained decoding hurts extraction. We never succeeded in measuring the technique. Recording the second sentence instead of the first would close a promising direction on a false basis, which is exactly the kind of mistake this file exists to prevent.

What it records

Four A/B readings on 30 Factur-X documents, each of which looked like a result and each of which was an artifact:

Reading Actual cause
−41.4 pp Optional properties chosen by a hash of the field name mod 2
−44.3 pp Array length derived from the token budget, not chosen by the model
−83.8 pp (7B guided 0.0%) {} is schema-valid when nothing is required; 7B took it every time
−67.2 pp Decimal point missing from the number mask (473.004.73e+31); null-vs-string branch bias

It also records the fingerprints that distinguished artifact from result, since those transfer to future measurements: a field at exactly −100 pp across all documents is never being emitted; a guided arm running faster than the unconstrained one is terminating early; numbers working while strings collapse points at branch selection rather than capability.

Two process notes are kept deliberately. The 7B run existed only as a guard against a small-model artifact (precedent: table injection, −11.4 pp on 1.5B vs +0.8 pp on 7B) and is what exposed the largest defect — one model alone would have produced a coherent and entirely false story. And one fix we specified ourselves is what made the empty object legal; the previous code was wrong, and its wrongness had been hiding the hole.

Carried over for any repeat attempt: optional-in-Swift is not optional-in-JSON for constrained decoding — every key required to appear, absence expressed as null.

Docs only; no code changes.

Four A/B readings on 30 Factur-X documents (-41.4, -44.3, -83.8, -67.2 pp) were
all artifacts of distinct defects in AnyLanguageModel's constrained JSON
generator, not properties of constrained decoding. Records the five defects, the
fingerprints that distinguished artifact from result, and the design point that
optional-in-Swift is not optional-in-JSON for constrained decoding.

The technique itself remains unmeasured; saying otherwise would close a
promising direction on a false basis.
@asaptf
asaptf merged commit f174566 into main Aug 10, 2026
2 of 3 checks passed
@asaptf
asaptf deleted the docs/guided-generation-measured-negative branch August 10, 2026 10:56
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant