Own Weights

AI for logistics paperwork

Trained models that read bills of lading, commercial invoices and proof-of-delivery forms, tested on your shipments and run in your own cloud or building.

Updated

Part of: AI for customs and logistics

AI for logistics paperwork means a trained model that reads the documents a shipment creates and pulls out the fields your systems need. Own Weights fine-tunes an open-weight model on your own shipping documents, tests it against the carriers and brokers you actually use, and serves it in your cloud account or your building, so the model and its data stay under your control.

Where the paperwork time goes

A single shipment can produce a purchase order, a carrier’s bill of lading, a commercial invoice, a packing list, customs entries and a signed proof of delivery. Each one repeats the same facts in a different layout. The consignee’s name sits under “Consignee” on one form and “Ship To” on another, and a weight may be written in kilograms on the invoice and in pounds on the bill of lading. Most of the labor is copying a value from one document into another and checking that the copies agree. Container and seal numbers, carton counts and PO references cause most of the errors.

Tasks that suit a trained model

Good fits are narrow and repeated:

  • Reading bills of lading and copying the shipper, consignee, notify party, ports of loading and discharge, container and seal numbers, and the freight terms marked prepaid or collect.
  • Matching a commercial invoice to its purchase order and packing list line by line, comparing SKU, quantity, unit price and currency on each side.
  • Pulling the seller, buyer, Incoterm, country of origin and declared value from an invoice, so a broker can check the tariff classification they already chose.
  • Reading proof-of-delivery images for the received count, delivery time, receiver’s name and any damage remark, then flagging any count that differs from the shipped count.

The extracted fields feed decisions: whether an invoice can be paid against its receiving record, whether a load goes on hold for a short count, and whether an exception goes to a broker. Design the output around those decisions.

A general chat model can read these files when prompted, and for a few files a day that may be enough. At volume, each call resends the instructions and the full document, and the output keys drift, so a parser that worked for one carrier breaks on the next carrier’s template. A model trained on your documents returns the same field names every time. The trade-off runs the other way too: a new layout means new examples and a new test.

Building the test on your own shipments

Our process has four steps: audit, evaluate, train and serve. The evaluation builds a test from your real documents and scores your current process on it first. Training has to beat that baseline on the same test before anything is deployed. The method is in our evaluation guide.

Build the test set in this order:

  1. Pull a month of real attachments, not a folder of clean exports.
  2. Include every carrier, forwarder and broker you use, plus the lanes with the most volume.
  3. Keep the worst scans: skewed pages, cut-off edges, faxes sent twice, and photos taken under a dock light.
  4. Split by shipment. Every document from one shipment goes into training or testing, never both.
  5. Label the blanks. If a consignee is not printed on the page, the expected value is empty.
  6. Set a tolerance per field. A weight off by a rounding step may be acceptable, while one wrong digit in a container number is not.
  7. Score your current process on the same set before you train anything.

Container numbers, PO references and weights must match the source character for character, so score those fields with exact match. Names and addresses can use a looser rule, agreed in advance.

On a public extraction test of contract passages, our fine-tuned model scored 0.717 against 0.635 for a general frontier model given one prompt and no examples, where 1.0 is perfect. Contracts are not shipping paperwork, so this shows what task training does, not logistics accuracy. Full results are on the benchmark page.

Common mistakes

  • Splitting by document. A bill of lading in training and the invoice from the same shipment in testing lets the model memorize that shipment, and the score overstates accuracy.
  • Testing only clean files. The scores look good, and the live inbox fails on the first skewed scan.
  • Letting the model fill gaps from context. If the notify party is blank, an empty field is correct. A value copied from the previous shipment is a wrong record that looks right.
  • Mixing units without a rule. “12 PLT”, “12 pallets” and “12 skids” should map to one field with one unit, and kilograms and pounds need an explicit conversion rule.
  • Skipping handwriting. Damage remarks and short-count notes on proof-of-delivery forms often carry the decision, so give them their own test rows.

Where the model runs and who controls it

Shipping documents carry customer names, pricing, delivery addresses and sometimes driver or recipient details. The model can run in your own cloud account or inside your building, under your access controls, logging and retention rules. You own the weights. Running it in your environment does not make your process compliant. Your own controls decide that, and your auditors will ask about them. The cloud setup guide covers the options, and the data privacy guide covers retention questions.

Keeping it reliable after launch

Carrier templates change, new brokers start sending files, and scan quality shifts. Run the test set before every model update, and keep the version that passed so you can roll back. Treat a new document type as a new test. Send low-confidence fields to a person, and track which fields reviewers correct most often, since those are the first candidates for new training examples.

The model assists the people who review its output. It is not customs, legal, tax or financial advice. A broker or compliance lead still signs off on customs declarations, and a person still approves payment on freight bills.

If your team already sends shipping documents to a frontier API, start with the free AI cost audit. It reads your code on your own machine, makes no network calls while it reads, uploads nothing, and lists your AI calls by task. Then book a call to talk through your document types and volumes.

Questions

Can AI read bills of lading and commercial invoices?

Yes. A model trained on your document types can pull shipper, consignee, quantities, weights and reference numbers from bills of lading and invoices. Test it on scans from your own carriers before you rely on it. Fields that are not on the page should come back empty.

How many documents do I need to train a model for freight paperwork?

The answer depends on how many document types, layouts and scan qualities you handle. Start with a sample that covers each carrier, lane and scan quality in your inbox. The test set decides whether the sample was big enough.

Can a trained model handle customs filings?

It can help a broker or compliance lead find the fields they need to check. It does not give customs advice and does not make a filing compliant. Your broker, your compliance team and your own controls decide what gets filed.