Two numbers decide whether a logistics AI project works, and neither of them is accuracy on a curated sample. The first is cost per document, fully loaded, against the cost of the clerk it is meant to relieve. The second is what happens to the documents the system cannot read — not as a fallback, but as the primary design surface, because the exception path is where the operational reality lives.
So the architecture puts a cheap triage step before any expensive model call. Legibility, orientation, page count and template match are scored first: rotated pages are rotated, unreadable pages are rejected with a specific reason rather than sent to a model that will produce something plausible about them. Documents are batched by template rather than by arrival, which lets one prompt carry template-specific instructions and a smaller model do the work.
Validation is cross-field rather than per-field, because individually plausible values that are jointly impossible — a total that is not the sum of its lines, a delivery date before dispatch, a weight that contradicts the packing list — are the highest-yield check available and cost nothing to run. And exception queues are typed. illegible_scan, unknown_template and arithmetic_mismatch go to different people with different fixes, and the distribution across those types tells you where to invest next. The whole design is set out on the document pipeline reference architecture.