Skip links
Abstract blue and cyan gradient cover for an article about why mostly-right data extraction isn't usable as operational data

Mostly-right data extraction isn’t operational data

Soft JSON from document extraction passes the demo; operational data needs a declared shape and rules you can fail.


When data extraction can’t clear finance

A data extraction run finishes green. Fifteen fields come back looking complete, the UI shows a clean form, and someone from the project team says “we’re done.” Then finance tries to post the result and the ERP rejects the date, the currency is a free-text guess, and the liability amount is still sitting there as “approximately 500,000.” Nothing in the model call failed; the handoff did.

That gap, between an extract that looks finished and data another system can consume without a human rewriting it, is where most of the remaining value leaks out once you’ve already decided to build a workflow. A fluent, mostly-right payload is still a guess. Operational data is a checkable record in a fixed shape that either clears your rules or is openly rejected.

Where this sits after the workflow decision

This series already argued that chat is not enough when the job is a process, and that a workflow engine is a different machine from a chat service once the output has to feed another system. It also argued that adding a document type should be configuration, which keeps a new type off the quarterly roadmap. Those pieces settle whether you need extraction and how you scale the types.

This piece is about the bar after that. Once a document type exists in the engine, the question that decides whether extraction pays off is whether each result is usable as operational data, or only good enough for a slide. The architecture overview put extraction next to chat for a reason; this is the property that separates a demo extract from one an ERP, a billing run, or an audit can stand behind.

Where things go wrong

The common trap after you leave chat behind is schema-optional extraction. The model is asked for “the important fields,” it returns plausible JSON, and the team treats that object as the product. Keys drift from run to run. Dates arrive as 15/01/2025, January 15, 2025, and 2025-01-15 in the same week. Closed sets like Incoterms become whatever phrase the document used. Missing values get invented because the prompt never gave the model a clean way to say null.

Downstream systems then become the real validators, which is the expensive place to find out the contract was never agreed. An ERP that rejects a payload, a person who re-types half the form, or a reconciliation three months later that can’t explain why a total doesn’t add up, are all the same design mistake showing up late. You extracted something without agreeing, in advance, what a valid extract is.

The quieter version of the same trap is a schema that only describes types and leaves every business rule to hope. A number field can be structurally perfect and still wrong for the business, for example a due date before the invoice date, or a subtotal plus VAT that doesn’t equal the total. Shape is necessary for operational data, and it still isn’t the whole gate.

Soft approximate extraction rejected by an ERP beside a schema-shaped record that clears business rules
A mostly-right extract can look complete and still be unusable the moment another system has to consume it. Image by author

Three gates before you have operational data

Usable extraction is a short stack of gates, and each one answers a different question.

The first gate is the schema, the declared shape of the record. Fields, types, required versus optional, nested objects, enums for closed vocabularies, and null where the model must be allowed to decline instead of invent. The schema is the contract with whoever consumes the data. You write it before you care how clever the prompt is, because the prompt is how you ask and the schema is what “done” means.

The second gate is constraining the model to that shape. Structured output locked to the schema turns “roughly 500,000” into a typed amount field with a currency, or into null when the document doesn’t support a confident value. Without that constraint, the schema is documentation and the model keeps writing soft prose inside JSON keys.

The third gate is business validation, the rules a shape can’t express on its own. Cross-field checks, date windows that have to run forwards, totals that have to reconcile, currency and country pairs that have to match. These rules belong next to the document type. Leaving them in the ERP’s error log or in a spreadsheet someone maintains by hand is how they show up too late.

An extract becomes operational data only when it clears the gates your organization has decided are mandatory for that type, or when a failed rule is handled as an explicit reject, retry, or partial path. Silent “mostly right” is none of those.

Model output passing through schema conformance and business validators to an accepted operational record or an explicit reject
Declare the shape, constrain the model, then run the rules; accept only what you can defend. Image by author

How to decide what “done” means

This gives you a practical test for any field someone wants the engine to pull.

If another system will consume the value, define it in the schema first, with a type and a null policy, before you argue about prompt wording. If the value can arrive in more than one format, pin the format in the schema (for example ISO dates) so every run speaks the same dialect. If the allowed values are a closed set the business already uses, put them in an enum instead of hoping the model paraphrases consistently.

If a rule depends on more than one field, it belongs in a business validator after the shape check. Stretching the prompt to carry that rule usually just produces more confident mistakes. Prompts suggest; validators decide. And if either gate fails, don’t treat the run as finished operational work. Persist what you need for review and audit if your process allows it, but don’t call the extract done until the record is in a state you’re willing to hand to the next system.

That last point is a product decision the model can’t make for you. Some teams block submit until every mandatory rule clears. Some accept a partial record with explicit gaps marked null and a human review step before integrate. Both can be honest. A green extract badge on a payload nobody downstream can load is neither.

You also need an explainable trail. When someone asks three months later why a field holds the value it does, or why a run was rejected, the answer has to be a lookup of what the model was shown and what it returned. The workflow engine article covers how that per-document record is shaped; the business requirement is simpler, in that operational data without a trail is data you can’t defend.

Reality check

None of this removes ownership work. Someone still has to decide which fields count for each document type, what valid looks like, which rules are hard stops, and where accepted data is allowed to land. Making types cheap to add, as the configuration argument described, raises the stakes on those decisions, because you’ll be encoding more of them.

Strictness cuts both ways. An over-strict schema rejects real documents that use odd but legitimate phrasing, and the team starts widening fields until the schema stops meaning anything. An under-strict schema ships garbage into operations with perfect confidence. The useful discipline is to be strict on the fields that another system or a regulator will actually read, nullable on the ones the document often omits, and honest about partial acceptance when the business can proceed with gaps.

Retries and review steps cost latency and money. Constraining the model and running validators are cheap compared with a wrong payment, and expensive compared with a demo that never leaves the slide deck. Budget for the path you chose, reject or human review, instead of pretending every document clears on the first pass.

And schema quality and retrieval quality are different jobs. If the search layer never surfaced the clause that held the liability cap, no schema will invent a trustworthy number. Operational data still depends on the document home and the search index underneath it; the gates above only decide whether what you did find is shaped well enough to use.

Conclusion

Once you’ve left chat for extraction, the demo instinct is to celebrate any JSON that looks complete. That instinct is how teams ship mostly-right payloads into processes that need operational data, and then wonder why finance, ERP, or audit still run a parallel human workflow.

The platforms that get value from extraction flip the definition of done. They agree the shape first, constrain the model to it, run the business rules the shape can’t carry, and treat anything that fails those gates as unfinished work. The model can still be wrong about the world; what changes is that wrong, incomplete, or unusable stops looking like finished.

The technical pair for this piece is Building schema-first extraction with validators.


Ideas, opinions, and tone are mine. AI helped with the language.

For more articles on AI-native document management visit the pialgorithms blog.


pialgorithms | document management software | ai engineering services

Portrait of Paris Perlegkas, founder of pialgorithms

Paris Perlegkas

Founder, pialgorithms