LIMITED-TIME OFFER: Get up to 15% OFF on Cloud Billing + FREE Cloud & DevOps Consultation Claim Offer LIMITED-TIME OFFER: Get up to 15% OFF on Cloud Billing + FREE Cloud & DevOps Consultation Claim Offer LIMITED-TIME OFFER: Get up to 15% OFF on Cloud Billing + FREE Cloud & DevOps Consultation Claim Offer
DevSecCops
Home
Case Studies
LOGISTICS • TRADE DOCUMENT AI • CASE STUDY

Shipment Documents, Read and Ingested Without Manual Entry

An AI document processor that reads shipment documents as they arrive and ingests the extracted data into the Exim Routes system — bookings, invoices, bills of lading, customs permits and certificates, without manual data entry.

FastAPI + UvicornGmail API PushLLM OrchestrationPostgreSQL
LOGISTICS · DOCUMENT AI
FastAPI + Uvicorn
Gmail API Push
LLM Orchestration
88-98%Of printed fields correct, hand-graded against 8 real client documents
9Pipeline stages, with one automated retry loop
0.85Minimum grade score before an extraction is saved
Client Requirement

Bookings, invoices and customs documents, read and keyed in by hand

Exim Routes receives bookings, invoices, bills of lading, customs permits and certificates from shippers, carriers and agents. Today they are read and keyed in by hand. The client needed a parser that picks documents up automatically, understands what each one is, pulls out the shipment fields and writes them into their system.

Logistics AI Solutions

Want Your Own Shipment Documents Extracted, Not Keyed In by Hand?

We'll scope a pilot around your exact document types and volume — a grounded extraction pipeline with automated retries — with clear success metrics before any production commitment.

Book a Free AI Scoping Call
What We Delivered

A pipeline that listens, extracts, grades and retries

A pipeline that listens to a mailbox and accepts uploads; converts PDFs (including scanned), Excel and CSV to text; uses an LLM to classify each document and a specialist extractor agent per type to pull structured JSON; grades every extraction and retries with feedback when quality is low; lets a person confirm or correct the document type before extraction; stores results, source files and an audit trail in PostgreSQL, with every LLM call traced.

1

Intake (Gmail push or UI upload)

2

Ingest store (dedupe by hash, queue)

3

Text extraction (PyMuPDF, OCR if scanned)

4

Classifier (an LLM picks the agent)

5

Human confirmation (optional)

6

Extractor agent (1 of 5, value plus source)

7

Grounding check (drops values not in the text)

8

Grader (scores 0 to 1)

9

Save to PostgreSQL — below 0.85 the extractor retries, up to 3 times

Supported documents

Booking confirmations

Carrier and forwarder bookings.

Shipment details

Bills of lading, sea waybills, waste forms, transport schedules, weighbridge tickets, delivery notes.

Commercial invoices

Standard commercial invoice fields.

Customs declarations

Permits, export declarations, certificates of origin.

Compliance certificates

Pre-shipment inspection, chemical analysis, marine insurance.

Reliability and security

  • Secrets stay in git-ignored files
  • Mailbox access is read-only with a query filter
  • Extraction is grounded against source text
  • Every event is in an audit log
  • Ingestion is idempotent — dedupe by message ID / file hash
  • Failed documents retry up to 3 times then stop as failed

Status and gaps to close before production

No API authentication yet; access-key based auth instead of an IAM role; a hard-coded local database password in the dev compose file; checkpoint state held in memory. Known limitations: Word files and standalone images are not parsed yet; the invoice extractor has no graded documents yet; extracted data is not yet pushed into the client's system.

Next: push shipments into the client's system through an agreed API; deploy to the cloud with an IAM role and secrets manager; add API authentication and role-based access; run the evaluation set in CI.

Why Build This With DevSecCops.ai

An engineering team that ships graded, auditable pipelines, not slide decks

AWS Advanced Tier Partner

Certified cloud and AI delivery, so your document pipeline runs on infrastructure built to AWS Well-Architected standards from day one.

Pilot-first engagement

We scope, build and validate against your real documents before you commit to a production rollout.

Grounded extraction with an audit trail

Extraction is grounded against source text and every event sits in an audit log, with every LLM call traced in PostgreSQL.

Graded, with automated retries

Every extraction is scored 0 to 1; anything below 0.85 retries with feedback up to 3 times before it's saved.

Trusted by forward-thinking teams

Cars24
Dekoder
FlexiLoans
Goodmeetings
Hypestore
Frammer
Hindustan
ShareChat
Microsoft Solutions Partner
Cars24
Dekoder
FlexiLoans
Goodmeetings
Hypestore
Frammer
Hindustan
ShareChat
Microsoft Solutions Partner
AWS CERTIFICATIONS

AWS-Certified Experts Delivering Cloud Excellence.

Solutions Architect
DevOps Engineer
Security Specialty
Cloud Practitioner
Data Engineer
Partner Badge
Partner Badge
Partner Badge
Solutions Architect
DevOps Engineer
Security Specialty
Cloud Practitioner
Data Engineer
Partner Badge
Partner Badge
Partner Badge

Explore AI Solutions in Other Industries

See how we've built agentic AI, document processing and computer-vision systems across fintech, HR tech, real estate and more.

View All AI Solutions
Logistics AI Solutions

Want Shipment Documents Extracted,
Not Keyed In by Hand?

Tell us about your document volume and formats — we'll help you scope a grounded extraction pilot with a measurable accuracy baseline.

A 9-stage pipeline with automated retries on low-quality extractions
Grounded extraction — values not found in the source text are dropped
88%-98% field accuracy, hand-graded against real client documents

Send us a message

Fields marked * are required.

By submitting you agree to our Privacy Policy. We never share your data.

Talk to an Expert