Guide 02 · Freight AI Governance & Data Architecture
Why Freight AI Pilots Fail Before Anyone Writes a Line of Model Code
Freight AI initiatives rarely fail over model code. They fail weeks earlier when probabilistic tools attach to unnormalized TMS schemas, exception-heavy EDI 204/214/210 pipelines, unmeasured ELD latency, ungoverned PII/cybersecurity workflows, and unreconciled accounting ledgers.
1. Why Generic AI Playbooks Break: Verified FMCSA Census Reality
Per the U.S. DOT FMCSA Motor Carrier Census snapshot (Dataset az4n-8mr2, compiled Dec 5, 2026), the U.S. holds 2,221,528 active USDOT entities across 50 states + DC, 686,694 active interstate motor carriers (686,886 incl. territories), and 146,196 active hazmat entities. Over nine-tenths of active interstate carriers hold no federal compliance review rating:
| FMCSA Compliance Safety Rating | Active U.S. Interstate Carriers | Share of Active Pool |
|---|---|---|
| Unrated (No Compliance Review Rating on File) | 636,784 | 92.71% |
| Satisfactory (S) | 39,247 | 5.71% |
| Conditional (C) | 10,294 | 1.50% |
| Unsatisfactory (U) | 561 | 0.08% |
2. Five Pre-Pilot Operational Control Layers
- SQL Schema Normalization & Read-Replica Isolation: Pre-aggregate orders, stops, legs, and charges to declared
(CompanyId, OrderId, CurrencyCode)grain; route all analytics and AI reads strictly to a lag-monitored read replica withSELECT-only permissions and statement timeouts. - ANSI X12 EDI 204/990/214/210/997 & Document Indexing: Separate transport receipt (
997) from structural validity (ISA13/IEA02,GS06/GE02,ST02/SE02,SE01counts, and210L1-to-B307net sums) and business acceptance. Index signed BOL/POD images to immutableOrderId+StopSequencekeys. - ELD Telemetry p95 Latency & Yard Polygons: Store
device_event_time_utc,tms_ingest_time_utc, and stop local timezone independently; monitor p95 event age across dispatch hours and use drawn yard polygons rather than default street-address circles. - Rate Governance, PII Scrubbing & NMFTA Cybersecurity: Maintain a single versioned tariff engine; enforce MFA, least-privilege RBAC, segmented API keys, automated technical PII redaction, NMFTA anti-spoofing controls, and signed zero-training vendor clauses with immutable audit logs.
- TMS-to-GL Reconciliation & Human-in-the-Loop Financial Guardrails: Keep AI in fast read-only triage and draft mode; require named clerk/supervisor approval (Tier 0–3 gates) before outbound emails, EDI 210 transmissions, driver settlements, or GL postings commit.
3. Read-Replica SQL Grain & Revenue Variance Blueprint
If deterministic SQL reporting views fail basic grain tie-outs, model tuning cannot rescue the pilot:
-- Sanitized read-only SQL grain & variance check (run on read replica; adapt to target schema)
WITH AggregatedCharges AS (
SELECT CompanyId, OrderId, CurrencyCode,
SUM(CAST(Amount AS decimal(19,4))) AS TotalChargeAmount
FROM reporting.FreightCharges
WHERE IsVoided = 0
GROUP BY CompanyId, OrderId, CurrencyCode
)
SELECT o.CompanyId, o.OrderId, o.CurrencyCode,
o.RatedRevenueAmount, c.TotalChargeAmount,
o.RatedRevenueAmount - COALESCE(c.TotalChargeAmount, 0) AS RatingVariance
FROM reporting.OrderHeader AS o
LEFT JOIN AggregatedCharges AS c
ON c.CompanyId = o.CompanyId
AND c.OrderId = o.OrderId
AND c.CurrencyCode = o.CurrencyCode
WHERE o.DeliveredAtUtc >= '2026-11-01T00:00:00'
AND o.DeliveredAtUtc < '2026-12-01T00:00:00'
AND (c.OrderId IS NULL OR o.RatedRevenueAmount <> c.TotalChargeAmount);