Skip to content

Industry-specific operational data

Customs entry and HTS classification data for trade-compliance AI

Quick answer

HTS classification training data is best built from customs broker and importer records that pair the terse commercial description actually filed with the 10-digit HTSUS code the broker assigned, plus every later correction, CBP query and ruling reference. Public CBP rulings give clean reasoning but describe products in ruling language, not invoice language. Buyers should specify the HTS edition per record, require correction history, tokenize importer and supplier identities, and evaluate at 6-, 8- and 10-digit levels.

By SourceX Editorial · Updated

What an HTS label actually encodes

An HTS label is a hierarchical code, not a flat class, so your schema and loss should respect the hierarchy. The first six digits follow the international Harmonized System, while the remaining four digits are US subdivisions: digits 7 and 8 usually carry the duty rate and digits 9 and 10 are statistical suffixes used for trade reporting. A model that gets heading 8518 right but misses the statistical suffix has made a very different error from one that lands in the wrong chapter.

The decision process behind each code is the General Rules of Interpretation (GRIs), applied in order. Classification follows the terms of the headings and the relevant section and chapter notes, and subheadings are compared only with subheadings at the same level. Ask whether supplier records capture which GRI resolved the decision (GRI 1 versus GRI 3(b) essential character, for example), because that field is what makes reasoning-trace fine-tuning possible.

Why broker decisions beat public rulings for training

Public rulings are good retrieval context, but they do not match the input distribution your model will face in production. One open example, a fine-tuned Llama 3.3 70B classifier called Atlas, was trained on a dataset derived from CBP's CROSS rulings with an 18,254/200/200 split, where each record pairs a product description, reasoning path and an HTS code [1]. Rulings are written after an importer has supplied detailed product information; brokers classify from lines like "PLASTIC PARTS FOR MACHINE" on a commercial invoice.

That gap is the commercial reason to license broker work product. Records from entry summaries (CBP Form 7501 line items), broker classification worksheets, product master files and client parts libraries show how experienced classifiers resolve ambiguous, incomplete descriptions. Use CROSS for retrieval-augmented generation and rulings citations; use licensed operational records for supervised fine-tuning and realistic evaluation sets. The same description-to-code pattern appears in product and spend classification data, but tariff law adds legally binding notes and revisions that generic taxonomies lack.

Corrections are the most valuable labels

The highest-signal records are the ones where the first answer was wrong. A post summary correction (PSC) lets the filer electronically correct an entry summary before liquidation, and each correction leaves a before-and-after pair. CBP Form 28 requests for information and Form 29 notices of action, along with protests and internal compliance reviews, mark the cases where an expert or the agency disagreed with the original code.

Ask suppliers three questions: whether they retain PSC versions rather than only the final summary, whether CF-28 and CF-29 correspondence is linked to entry lines, and whether reclassifications in the parts library carry a reason and date. Correction pairs support preference tuning, hard-negative mining and an eval set of known traps. Without them you are training on whatever the broker filed first, errors included.

Retention, versioning and why the date matters

Entry records usually exist for years, and each record must be tied to the tariff schedule in effect at entry. Under 19 U.S.C. § 1508 and CBP's recordkeeping regulations, entry-related records are kept for a set period, generally 5 years from the date of entry; confirm the current period in 19 CFR Part 163 with counsel. That means a broker's archive typically spans several HTS revisions, Section 301 and other tariff actions, and statistical suffix changes.

Require an hts_edition (or revision identifier) and entry_date on every line. Without them, a code that was valid in one revision appears as a label error in the next, and duty-rate fields silently drift. Map retired codes forward with a concordance only as a derived field; never overwrite the label the broker actually filed.

Confidentiality and authorization in broker data

Customs records are competitively sensitive, so expect tokenized parties and banded values rather than raw entries. Importer of record numbers, consignee and manufacturer identifiers (MID), supplier names, unit values and country-of-origin patterns can reveal a client's sourcing strategy. Brokers hold this data on behalf of importers, so confirm that the broker–client agreement permits licensing for model training, as covered in authorization for client data held by service providers.

Personal details still appear: contact names and emails in CF-28 correspondence, signatures on declarations, and account numbers on duty statements. These should be removed or replaced before delivery, with the method documented.

Artifact: illustrative classification record schema

Use this record shape in a request or data specification. Field names are suggestions; what matters is the separation of original filing, correction and context.

Illustrative example: invented to show structure; it does not describe an available dataset.

FieldExample valueWhy it matters
line_idE7-000412-03 (tokenized)Joins line to corrections and correspondence
entry_date2025-03-14Anchors the tariff edition
hts_edition2025 Rev. 4Prevents false label errors across revisions
invoice_descriptionABS HOUSING, MOLDED, FOR HANDHELD SCANNERThe real model input
supplemental_attrsmaterial, function, end use (JSON)Lets you test with and without enrichment
hts_filed10-digit code as filedOriginal label
hts_final10-digit code after PSC or CBP actionCorrected label
correction_sourcePSC / CF-29 / internal_review / noneSignal type and strength
gri_basisGRI 1, GRI 3(b)Supports reasoning supervision
ruling_refslist of cited ruling numbersRAG grounding and citation evals
duty_rate_bandbanded, not exactDuty-impact scoring without exposing values
importer_token, origin_regiontokenized / generalizedConfidentiality

Store it as JSON Lines, UTF-8 with one entry line per JSON object [4], and ship a data card describing sources, annotation (who classified, broker licensure, review process) and known gaps [3]. This mirrors how document-to-system entry pairs are specified for back-office agents.

How to evaluate an HTS classifier on licensed data

Report accuracy at 6-, 8- and 10-digit levels and weight errors by duty impact, not only exact match. A wrong statistical suffix rarely changes duty owed, while a wrong 8-digit subheading can change the rate and trigger penalties, so a single top-1 number hides the failures that matter to brokers.

Build the eval set from correction pairs and expert-adjudicated lines, then audit it. Benchmark test sets routinely carry label noise; one audit of widely used benchmarks estimated an average label error rate of at least 3.3% [2]. Run confident-learning label checks on filed codes before treating them as ground truth, and hold out by importer and by product family so the model is not rewarded for memorizing a client's parts library.

Illustrative example: invented to show structure; it does not describe an available dataset.

  • Coverage: chapters present, with counts per 2-digit chapter; flag thin chapters (textiles in Chapters 50–63 and machinery in 84–85 tend to be both large and hard).
  • Label provenance: licensed broker, importer compliance team or automated tool.
  • Correction share: percentage of lines with a PSC, CF-28/CF-29 or internal reclassification.
  • Edition coverage: HTS revisions spanned and whether each line carries one.
  • Description realism: sample 50 lines and compare length and vocabulary with your production traffic.
  • Rights: broker–client authorization and supplier approval for the stated uses.

Where SourceX fits for customs classification data

SourceX sources operational datasets from US companies on request, including documents and finance and legal workflows, and manages licensing and ongoing purchases. Nothing is held in stock and a request does not guarantee a match; each release is approved by the supplying company, rights-reviewed for ownership and consents, and delivered under a license that defines records, uses, term and delivery. Buyers in logistics, freight brokerage and third-party logistics can describe the records they need on the buyer request page. For adjacent sources, see supply chain and logistics datasets, freight broker and carrier communications data and the industry data hub.

This page is general information, not legal advice. Confirm requirements with counsel for your jurisdiction and use case.

Request HTS classification training data

Describe the data, not the businesses: chapters, description style, correction history, HTS editions and intended uses such as fine-tuning or evaluation. SourceX assesses data and licensing permissions, agrees pricing and allowed uses with the supplier in a license, and delivers through private, access-controlled workflows only after an executed agreement and supplier approval. Start a customs classification data request.

Sources

  1. Yuvraj and Devarakonda (Flexify.AI), arXiv, "ATLAS: Benchmarking and Adapting LLMs for Global Trade via Harmonized Tariff Code Classification" (2025). https://arxiv.org/abs/2509.18400
  2. Northcutt, Athalye, Mueller, "Pervasive Label Errors in Test Sets Destabilize Machine Learning Benchmarks" (2021). https://arxiv.org/abs/2103.14749
  3. Pushkarna, Zaldivar, Kjartansson, "Data Cards: Purposeful and Transparent Dataset Documentation for Responsible AI" (2022). https://arxiv.org/pdf/2204.01075
  4. jsonlines.org, "JSON Lines". https://jsonlines.org/

Tell us what your models need

Share scope, volume, language, format, timing and licensing requirements.

Request data