The Valid Empty Schema: How Silent Extraction Failures Poison DeFi Risk Engines

PowerPanda • • Markets

Last week a structured extraction report landed in my queue. By every automated measure it was flawless. Valid JSON. Every required key present. Types correct, enums inside their permitted sets, zero parse errors, zero schema violations. And it contained nothing. The title was an empty string. The source was an empty string. All three core claims were empty strings. The information-point list — the array every downstream reasoning step depends on — was []. Project, protocol, time-sensitivity, source quality: each parked on a placeholder instructing the reader to judge for themselves, with no raw material to judge.

The validator returned green.

The failure is not the interesting part. Extraction pipelines fail constantly and quietly, and half my working life is spent finding them. The interesting part is that this one failed while satisfying every assertion anyone had thought to write down, and then handed the certificate downstream. Somewhere upstream a decoder ran out of budget or a schema was too rigid to permit prose, and what came out the other side was a document shaped like knowledge and containing none. The pipeline did not fail. It was engineered to accept the void.

Two stages, one trust boundary

The architecture in question is the one most research desks converge on independently: a first stage that compresses an article into a fixed schema — title, source, type, domain, three core claims, a list of atomic information points each carrying its provenance, and a handful of judgement fields — and a second stage that reasons over that schema instead of over the original text. The design rationale is sound and I have built variants of it myself. Raw text is expensive in context and adversarial in structure; a schema is cheap, cacheable, diffable, and lets you run the expensive reasoning pass over a dozen documents at once.

The implicit claim of that architecture is that stage two can trust stage one because stage one is schema-constrained. That claim is false, and it is false for a reason so banal it gets skipped in every design review I have ever sat in. A JSON Schema is a type system, not a truth system. "type": "string" admits the empty string. "type": "array" admits []. "required": ["title", "summary", "info_points"] is satisfied, fully, by a document in which every required field is "" or []. Nothing about the word required implies non-triviality. Nothing about a passing validator implies that anything was read.

This is not a new idea. It is the SQL NULL-versus-empty-set distinction wearing a new coat, and the database community settled the semantics forty years ago by making people declare which one they meant. The LLM tooling ecosystem has spent three years rebuilding the same trap with worse tooling and more confident marketing. The trust boundary between stage one and stage two is where every downstream conclusion gets its warranty, and almost nobody audits it, because it works. It returns 200. It returns parseable JSON. It returns green.

What I actually measured

I do not trust an architecture opinion I have not stress-tested, so I built a harness. Twelve thousand synthetic extractions, generated by forcing a real extraction model into four degradation modes that I have observed in production: truncation (the decoder hits max_tokens mid-document), template collapse (the model emits the schema shell and stops reasoning, usually because the schema itself consumed most of the available budget), field dropout (individual fields silently omitted or nulled), and fabricated filler (fields populated with plausible text ungrounded in any source span). Each document was then scored against two validators.

The first was the naive validator: structural types plus required-key presence. That is what the overwhelming majority of production pipelines ship, usually as a three-line Pydantic model.