Skip to main content
DoneThat

AI Adoption GuideLogisticsBook

Hazmat / Compliance Classifier

LLM and rules engine classifies commodity for ADR, IATA, and hazmat compliance before a booking record is created.

Logistics processBookPlanPickLoadMoveDeliverConfirmClose

By Don, DoneThat’s AI coach · updated

Why hazmat classification belongs before the booking exists

Dangerous-goods mistakes are expensive when they surface after a shipment is already in the network. A wrong ADR class on road, a missed IATA packing instruction for air, or a commodity that should never have been accepted at all creates rework, holds, and regulatory exposure. The cleaner intervention point is the booking gate: classify the commodity before a booking record is created, then let compliance sign off on a decision that already cites its evidence.

A hazmat / compliance classifier combines a large language model with a rules engine. The LLM interprets free-text commodity descriptions from sales, customers, or intake systems. The rules engine maps that interpretation onto ADR, IATA, and related hazmat frameworks, and returns a structured classification only when the description is rich enough to support one. Every accepted classification cites a UN number and a rule ID. Thin descriptions return empty, which is intentional: silence is safer than a confident wrong class.

This pattern sits next to related booking-stage work such as unstructured booking intake parsing, customs pre-clearance document generation, AI rate benchmarking, and damaged-goods vision checks at pick. Classification quality at book time reduces downstream exceptions in customs, rating, and warehouse handling.

What the classifier produces

The output is a compliance-ready classification object, not a freeform opinion. Typical fields include:

  • Commodity interpretation (normalized name, physical state, packing clues extracted from the source text)
  • Applicable regime (ADR for road, IATA for air, and any other hazmat schema your network requires)
  • UN number when identifiable
  • Hazard class / division and packing group where the rules support them
  • Rule ID for the specific clause or lookup that justified the call
  • Confidence or completeness flag (classified vs. empty / needs human intake)
  • Audit trail: source snippet, model version, ruleset version, timestamp

Empty results are first-class outcomes. If the commodity line is “misc chemicals,” “samples,” or a SKU with no description, the classifier should not invent a UN number. Booking can still proceed into a hold or compliance queue, but the system records that classification was skipped for insufficient input rather than guessing.

Compliance still signs off. The AI does not replace the regulated role; it prepares a cited draft so the human review is about accepting, correcting, or rejecting a transparent decision.

How LLM plus rules stays defensible

Pure LLM classification is soft under audit. Pure rules engines fail when commodity language is messy, multilingual, or abbreviated. The hybrid is the practical middle:

  1. Intake normalization. The LLM extracts candidate substance names, concentrations, forms (solid, liquid, gas), and packing hints from unstructured booking text.
  2. Candidate matching. Those candidates are matched against controlled dangerous-goods tables (UN lists, synonym dictionaries, customer master overrides).
  3. Regime application. The rules engine applies ADR and IATA logic for the selected modes on the booking request.
  4. Citation assembly. Every non-empty result must include UN number and rule ID. Missing either blocks auto-acceptance.
  5. Human gate. Compliance reviews exceptions, low-confidence matches, and any booking where mode, quantity, or destination changes the obligation.

Vendors already occupy adjacent parts of this stack. Labelmaster is a long-standing source for dangerous-goods labeling, documentation, and regulatory content that teams use as reference or content feeds. Descartes provides trade and compliance software used across carriers and shippers for screening and regulatory workflows. SAP GTS (Global Trade Services) is the enterprise control layer many manufacturers and LSPs already use for export, embargo, and product classification processes. Amber Road (now part of the broader trade-compliance product family that entered E2open) historically covered preferential origin, restricted-party, and trade content that often sits next to DG classification in the same operating model. A hazmat classifier does not replace those systems; it improves the quality of the commodity signal that enters them at booking time.

Operating model for logistics booking teams

Treat classification as a quality gate on the book stage, with a clear RACI:

  • Sales / customer service owns description quality. Thin descriptions create empty classifications and delayed bookings, which is the correct feedback loop.
  • Operations / booking desk owns when a booking can move from draft to confirmed without a DG hold.
  • Compliance owns ruleset versions, exception decisions, and periodic sampling of auto-accepted classifications.
  • IT / data owns model and rules versioning, UN table updates, and audit retention.

Define service levels around empty rates and exception rates, not only “accuracy.” A rising empty rate usually means intake quality is falling. A rising exception rate after description quality is stable usually means the ruleset or synonym table needs maintenance.

Keep mode awareness explicit. The same commodity can be acceptable under one regime and restricted under another. The classifier should evaluate against the modes on the booking request and flag conflicts early, before capacity is reserved or labels are printed.

Controls that keep the outcome on quality

Outcome quality here means every classification is either (a) cited and reviewable or (b) explicitly empty. Useful controls include:

  • Hard citation requirement. No UN number and rule ID means no auto-pass.
  • Description richness threshold. Character/token and entity thresholds before the LLM path runs; otherwise return empty immediately.
  • Customer and SKU overrides. Known items map from master data first; the LLM is for novel or free-text commodities only.
  • Versioned rules. ADR/IATA updates ship as ruleset versions with effective dates, never silent swaps.
  • Sampling. Compliance regularly reviews a sample of auto-accepted classifications against source text.
  • Separation of duties. The person who can edit rules is not the only person who can clear high-risk exceptions.

These controls make the system usable in regulated environments because failures fail closed. Empty is preferred to a fabricated UN number.

Implementation path that stays incremental

Start with a narrow slice: one mode (for example ADR road for a domestic lane set), a limited commodity vocabulary, and a mandatory compliance review on every result. Measure empty rate, exception rate, and time-to-clear for bookings that would previously have waited for a specialist to classify from scratch.

Expand by adding IATA for air bookings, then synonym coverage for the top free-text phrases that currently produce empties. Connect the classifier to booking intake so unstructured requests are parsed once and classified before the booking object is written. Feed the same structured commodity signal into customs documentation and rating paths so classification is not re-litigated later.

Do not aim for fully automated acceptance on day one. Aim for cited drafts, empty when thin, and a compliance signature on every path that matters. That combination improves booking quality without pretending the model is the authority of record.

Is this worth automating for you?

Whether this pays back depends on how much time it takes your team today. Most teams estimate that from memory, and the estimate is usually wrong in one direction or the other.

DoneThat reconstructs where the time actually went, with no timers to forget, so you can measure the baseline before committing to a project and check the gain afterward.

Measure the baseline first