A client once showed me an extraction pipeline that had been "working" for six weeks. Documents in, structured JSON out, straight into Postgres. Coverage checks showed a notes field that was present on every record — but suspiciously short. One sentence where the source had a paragraph.

Every record validated. Every field had the right type. Every dashboard was green. The system was quietly storing summary-shaped holes and calling it success.

This is the failure mode I now check first, and it is almost embarrassingly simple: the model hit its output-token ceiling and stopped mid-answer, and the JSON happened to still parse.

How silent truncation hides

max_tokens was set to 1024 on a Tuesday, when outputs were one-liners. Months later the documents were longer and the schema richer. Once completions hit the ceiling, the API stopped emitting mid-sentence — except the cut landed after a complete key-value pair, so json.loads shrugged and returned less data. No exception. No log line. No alert.

The tell was only visible if you went looking:

  • finish_reason was "length" on roughly a third of calls. Nobody was logging it.
  • The last field of every object was systematically shorter than the middle fields.
  • Key counts dropped below the schema's expectation on longer inputs.

A parser cannot see any of this. Valid JSON, right types, plausible values. The bytes were fine; the content was gone.

The fix, in order of cost

  1. Log finish_reason and alert on anything that isn't stop. One line of logging would have caught this on day one. Any other value is a defect until proven otherwise.
  2. Budget from the schema, not from vibes. Compute expected_tokens(schema, input_length) and set max_tokens to expected * 1.5 + 256, capped by the model's hard limit. Re-check it whenever the schema changes, because nobody remembers to.
  3. Validate completeness, not just validity. For extraction, require that every source section shows up (by hash or keyword) in the output, or flag the record incomplete and re-run with a bigger budget.
  4. If you stream, check finish_reason in the final chunk before you commit the parsed object anywhere. By then it is too late for everything downstream.

The uncomfortable generalization

Parsers check syntax. They never check semantics. "The JSON parsed" is a statement about bytes, not about content — and every LLM pipeline that validates only syntax has a truncation-shaped hole in it somewhere. The single most valuable field in any LLM API response is the one your logs almost certainly don't contain: the finish reason.

This is one of seven failure families in my field guide, Agent Reliability Forensics — the others are silent quota failures (HTTP 200 with a degraded brain), retry storms that look like load, staleness, context poisoning, tool degeneracy, and eval drift. The full write-up of this case file, with the raw log excerpts and the exact queries, is in the guide: https://github.com/derbaroser-eng/agent-reliability-forensics

If your extraction pipeline has a notes column that's gotten shorter over time, go check finish_reason before you read another line of code. I'd bet a coffee it isn't the model getting lazier.