Avery.Software — Native Execution Runtime
RuntimeUse casesPricingHelpBlog
← All postsBlog

Supply chain and logistics: where documents move with the freight

2026-05-28 · Avery NXR

Supply chain and logistics is one of the most document-intensive industries operating today. Every shipment generates a stack of documents: bills of lading, commercial invoices, packing lists, customs declarations, certificates of origin, shipping notices, delivery receipts, freight invoices. Each document has to be processed, validated, matched against orders, reconciled against payments, and stored for regulatory and audit purposes.

The volume is enormous. The global logistics industry moves billions of shipments per year. Even a single mid-sized 3PL (third-party logistics provider) handles hundreds of thousands of shipments and millions of associated documents annually.

The work was historically done by hand. The hand work didn't scale. AI has taken over most of it in the past three years. The bill, in the cloud-LLM-default architecture, is real and growing.

The math

A representative mid-sized 3PL handles, say, two hundred thousand shipments per year. Each shipment involves an average of six to eight documents that need to be processed by AI — extracted, validated, matched, reconciled.

For each document, a typical AI workflow uses about three thousand input tokens (the document plus the order context) and three hundred output tokens (the structured extraction). At frontier pricing, about $0.014 per document.

Across two hundred thousand shipments and seven documents per shipment, that's 1.4 million documents per year at $0.014 each — about $19,600 per year, for one 3PL.

For a larger logistics operator — say, a regional freight forwarder handling a million shipments per year — the bill is in the $100,000 range. For a global logistics platform handling tens of millions of shipments per year, the bill is in the seven figures.

These numbers exclude the upstream OCR and document classification, the downstream ERP integration, and the various track-and-trace systems. The AI extraction and validation layer is the line item we're examining.

Why supply chain is a strong local-SLM workload

The properties are all present.

The work is narrow. The model needs to know the specific document patterns used in international shipping — the formats, the Incoterms, the HS codes, the carrier-specific variations. A model trained on the operator's actual document flow outperforms a general model.

The work is repetitive. The same shape of bill of lading, the same shape of commercial invoice, the same shape of packing list, repeated hundreds of thousands of times per year. Specialization compounds.

The volume is enormous and grows with the operator's business.

The privacy story is real but a different shape than in other industries. Shipping documents are commercially sensitive — they reveal what customers are buying, who they're buying from, what their pricing looks like, what their margins might be. Sending all of this to a third-party cloud LLM creates competitive intelligence exposure that some operators are uncomfortable with. For operators serving competitively sensitive industries (defense, pharma, semiconductors), the constraints are tighter still.

The latency story matters in customs and border workflows where the document processing needs to complete inside a clearance window. Two-second cloud latency may push a shipment past a customs cutoff; two-hundred-millisecond local inference fits comfortably.

What changes with local inference

A logistics document workflow on a local SLM looks like this.

A model is fine-tuned on the operator's historical document flow — the specific formats encountered, the trading partners involved, the typical errors and edge cases. The fine-tune captures the operator's specific patterns.

The model runs on infrastructure the operator controls. Documents flow through the extraction pipeline. The structured data flows into the TMS, ERP, customs filing systems, and downstream systems.

The cost flips from per-document to fixed. Shipment volume can grow with the operator's business without the bill scaling.

The competitive intelligence stays inside the operator's systems.

The customs clearance latency improves.

The audit trail is local, structured, and queryable for the various regulatory inquiries that come up in international logistics — customs audits, trade compliance reviews, tax authority requests.

What gets better, beyond cost

A fine-tuned local model produces better extractions than a general model, in specific ways.

It knows the specific document formats used by the operator's carrier partners. Each ocean carrier has slightly different bill of lading templates; each airline has slightly different airway bill formats; each customs broker has slightly different filing conventions. A general model approximates. A fine-tuned model knows.

It knows the specific HS codes the operator uses for its typical commodity mix. Customs classification is a famously error-prone task; a fine-tuned model on the operator's historical classification patterns produces fewer errors.

It knows the operator's typical edge cases — the unusual destinations, the unusual cargo types, the unusual payment terms. A general model treats edge cases as outliers; the fine-tuned model recognizes them as routine.

For a logistics operator, the quality improvement is meaningful. Fewer extraction errors mean fewer customs delays, fewer payment disputes, fewer reconciliation problems. The cost savings of local inference compound with the operational savings of better extractions.

When the cloud LLM is still acceptable

A few cases.

For very small operators — owner-operator trucking, small import/export brokers — the infrastructure investment doesn't pay back. Cloud LLM tools work fine at this scale.

For one-off document categories that fall outside the operator's normal document flow. A general model's breadth helps with the long tail of unusual documents.

For early-stage operators without enough document history to fine-tune on. The cloud LLM bridges the gap until the corpus is built.

For most logistics operations at any meaningful scale — the 3PLs, the freight forwarders, the carrier operators, the customs brokers, the logistics platforms — the local-SLM case is strong on cost, strong on privacy, and strong on operational quality.

The pattern, in logistics

Avery NXR is not a logistics tool. It scaffolds Next.js applications. The architectural pattern repeats.

Logistics document processing is a narrow, repetitive, high-volume, competitively-sensitive, latency-relevant workload. The economics that favor a specialized local model for code scaffolding favor a specialized local model for logistics documents. The competitive intelligence story is unusually relevant here — the documents reveal trade relationships, pricing, and supply chain structures that operators want to keep proprietary.

The supply chain AI vendors that build excellent local-inference tooling — with appropriate fine-tuning across the global document formats, integration with the major TMS/ERP/customs platforms, and sensible business models — will find willing buyers across the logistics stack. The cloud-LLM-default products will hold a portion of the market, particularly at the long tail of small operators, but the institutional segment will pivot as soon as the tooling matures.

The pattern continues. Logistics is one of the workflows where the architectural shift is straightforward — the cost case is real, the privacy case is meaningful, and the operational quality case adds the third leg of the argument. Operators that move first will be more profitable and more competitive than those that wait.