Stop the model from fabricating
Per study guidePlain languageModels invent plausible-sounding values when a field is marked as required but the information just isn't in the source document. The fixes, roughly from most-direct to least: make the field genuinely optional so it's allowed to be skipped; explicitly say 'return null if this isn't stated'; and for a specific recurring quirk (like informal recipe measurements), show a couple of examples of exactly how you want it handled. Retrying the request over and over only helps with formatting mistakes — it can never invent data that was never there to begin with.
TechnicalIn order of directness: make genuinely-optional fields optional in the schema; explicitly instruct 'return null if not stated'; for recurring domain-specific quirks, provide few-shot examples of the exact desired handling. Retries resolve formatting failures only — they cannot conjure information absent from the source.
Why it matters
A required field forces an answer; making it optional removes the pressure that causes fabrication in the first place, which is more reliable than trying to catch fabricated values after the fact.
Model the real world (amendments, totals)
Per study guidePlain languageSometimes a value genuinely changes over time — a contract amendment overriding the original term — and forcing the extraction into a single answer throws away real information. Instead, design the schema to hold multiple values with the date each one took effect. Similarly, when numbers are supposed to add up (invoice line items vs. a stated grand total), capture both the computed sum and the stated total and flag it for a human when they disagree — never silently 'fix' financial figures yourself.
TechnicalWhen a value legitimately changes (e.g., contract amendments), the schema should capture multiple values with source location and effective dates rather than forcing a single answer. When values must reconcile (line items vs. stated total), capture both the computed and stated values and flag mismatches for human review rather than silently auto-correcting.
Why it matters
Flattening a genuinely historical or reconciliation-requiring value into one number destroys information a downstream human or system may need — the schema should mirror the domain's real shape, not a simplified fiction of it.
Human review should follow risk, and be measured
Per study guidePlain languageIf reviewers can only look at a small slice of output, spend that slice on the cases most likely to be wrong — low-confidence extractions and ambiguous or contradictory source material — not a random sample. And before trusting a 'high confidence' bucket to run unreviewed, check accuracy broken down by document type and field, not just as one big average number, because an overall-good number can hide specific weak spots. To keep catching rare errors in the stuff you've already decided to trust, run an ongoing stratified random sample as a standing audit.
TechnicalWith limited reviewer capacity, route low-confidence and ambiguous/contradictory cases for review, not a random sample. Before automating high-confidence cases, verify accuracy per document type and per field — an aggregate accuracy number can mask weak segments. To catch and measure rare high-confidence errors over time, use stratified random sampling as an ongoing audit, distinct from the risk-based routing used for day-to-day review.
Why it matters
Risk-based routing and stratified sampling solve two different problems — routing maximizes value from scarce day-to-day review capacity, while sampling is what lets you detect and measure drift in the cases you've already decided not to routinely review.
Retries fix formatting, never missing data
Per study guidePlain languageIf a validation error comes back because a value is the wrong shape (a string instead of a number, a nested object instead of a flat list), feeding that specific error back to the model and asking it to retry usually fixes it in a try or two. But if the actual information was simply never present in the source document, no amount of retrying will make it appear — that's a data problem, not a formatting problem, and needs a different fix (e.g., an optional field or a null).
TechnicalRetry-with-error-feedback effectively resolves reformatting failures (wrong type, wrong nesting, wrong date format) because the underlying data exists and simply needs reshaping. It cannot resolve failures where the required information does not exist anywhere in the input — no retry count fixes a missing-source-data problem.
Why it matters
Distinguishing 'the data exists but is misshapen' from 'the data was never provided' determines whether retrying is the right lever at all, versus needing a schema or instruction change instead.