Skip to content
All notes
Engineering10 Jun 2026 · 9 min

Killing PDF re-typing: how document extraction actually works

By Freightflow Team

"AI reads the PDF" is the marketing sentence. The engineering underneath is more specific, and the specifics are what make it trustworthy on a document you've never seen before.

Read, then classify, then extract

First the document is read — text-based PDFs the fast way, scanned pages through OCR. Then pages are classified so terms-and-conditions, penalty tables and fee annexes are set aside, and only the data-bearing pages go forward. Then language and vision models pull the fields that matter: booking number, vessel and voyage, POL and POD, ETAs, equipment, charges and dates.

Carriers don't agree on layout, so the extractor carries line-specific rules. It knows the ETA printed near the port of loading isn't the destination ETA, that some lines pack multiple labels into one field, and that a terminal suffix on a port name should resolve back to the base port.

Confidence is the honest part

Every field comes back with a confidence score. That number is what lets the system decide what to trust and what to route to a human — and it's why we won't quote a single platform-wide accuracy percentage. The right question isn't "how accurate is it," it's "how sure is it about this field, on this document, right now."

The result: no one re-types a booking confirmation. The fields arrive validated against your masters and tariffs, and the exceptions — the genuinely ambiguous ones — are the only thing left for a person to look at.

The hard cases are the whole point

Clean, text-based PDFs are the easy part. The value is in the rest: a scanned bill of lading photographed at an angle, a booking split across a transshipment with two vessels and two ETAs, a carrier that abbreviates ports in its own private shorthand. Generic extraction falls over exactly here — which is why the pipeline carries freight-specific knowledge instead of hoping a general model guesses right.

It also knows when to stop. If a field is genuinely ambiguous, the honest move is not to invent a confident-looking answer but to say so — low confidence, route to a human. A system that knows what it doesn't know is worth far more on a real operations desk than one that's occasionally, silently wrong.

See it on your own documents

Book a walkthrough and we'll run Freightflow on your real booking confirmations and bills.