A manufacturing office processes four document types over and over. Each one has fields that must be extracted, rules that must be checked, and a person who signs off.
Automation does not remove the person. It removes the reading.
The four document types
Quote requests
Extract: customer, part number, quantity, material, finish, tolerance, due date, delivery terms.
Check: the part exists in the ERP, the material is available, the quantity breaks a price tier, the due date is achievable.
Output: a draft quote with the historical match and the margin applied by rule.
Spec sheets and drawings
Extract: dimensions, tolerances, material, surface finish, inspection requirements, notes.
Check: the tolerance is within the process capability, the finish is available, the notes conflict with the drawing.
Output: a structured record attached to the part, with the source page for each field.
Purchase orders
Extract: PO number, line items, quantities, prices, delivery dates, terms.
Check: it matches the sales order, the price matches the quote, the quantity is available, the date is achievable.
Output: a matched record with the differences flagged.
Supplier confirmations
Extract: order reference, quantities, prices, lead times, substitutions.
Check: the confirmation matches the PO, the substitution is approved, the lead time does not break the schedule.
Output: an exception list for the buyer.
The architecture that works
Four layers:
- Capture. The document arrives by email, portal, or scan. It is stored with its source.
- Extract. OCR where needed, then a model with a schema for the document type.
- Validate. Rules check the extracted fields against the ERP and the historical data.
- Review. A person sees the fields, the source, and the exceptions, and approves or edits.
The model does not make the decision. It fills the form and finds the mismatch.
Why validation rules matter more than the model
A model can extract a date. It cannot know that the date is impossible because the material has a six-week lead time.
That check is a rule, and it belongs in code. The combination of extraction and rules is what makes the output trustworthy. A model alone produces a confident field. A rule produces a flag.
The rules are also cheaper to maintain than a prompt. When the lead time changes, the rule changes. The model does not need to be retrained.
Exception handling
Every document type has exceptions:
- A part that is not in the ERP.
- A material that is discontinued.
- A tolerance that the process cannot hold.
- A price that does not match the quote.
- A quantity that breaks a tier.
- A document that cannot be read.
Each exception needs a route: who sees it, what they decide, and what the system records. An exception with no route becomes an email that sits in an inbox.
Evaluation
Use 30 documents with known correct answers.
- Field accuracy, by field. A part number error is worse than a notes error.
- Exception recall. Did it catch the mismatches you know about?
- False positive rate. A list of flags nobody trusts is worse than no list.
- Review time. If the review is slower than the manual process, the automation failed.
Four metrics. The last one is the one that decides adoption.
Where document automation fails
The OCR is treated as perfect. A bad scan produces a confident wrong field. The workflow needs a "cannot read" path.
The schema is too broad. One model for four document types extracts nothing well. Use one schema per type.
The rules live in the prompt. A prompt that says "check the lead time" is not a validation. The rule belongs in code.
The review screen shows only the extracted fields. The reviewer needs the source page next to the field.
Nobody maintains the rules. The process changes, the rules do not, and the flags become noise.
What a pilot looks like
- One document type, one customer segment.
- Thirty documents with known answers.
- Extraction plus three validation rules.
- A review screen with the source.
- Two weeks in parallel with the manual process.
- A decision: expand, adjust, or stop.
Six steps. The parallel run is the part most projects skip, and it is the part that builds trust.
Two rules that keep it honest
Every field shows its source page. A reviewer who cannot see the page the date came from will either trust it blindly or check the whole document by hand. Both defeat the automation.
A page that cannot be read is an exception, not a guess. The workflow needs a path that says "cannot read" and routes the document to a person. A model asked to extract from an illegible scan will produce a confident field, and that field is worse than a blank.
Those two rules cost a little build time and prevent the failure that ends the project: one wrong part number that reaches a customer.
Related
- AI for manufacturing: the wider view.
- AI for manufacturers: the starting point.
- Private AI for manufacturing: keeping the documents inside.
- AI agent evaluation: how to test the extraction.
Questions owners ask
It can read a clean scan with a title block and printed text. Handwriting and poor scans are unreliable. Test on your files.
No. It removes the reading and the lookup. The estimator still prices the exception and owns the quote.
The validation reads from it. Writing back is a separate decision with its own approval and audit design.
It depends on the document quality and the field. Set the pass mark per field, and measure it on your own documents before production.
Quote requests, if the volume is there. Purchase orders are a close second because the matching rules are clear.

