Technologies

How can AI assist with the classification of HS codes?

AI assists with HS code classification in two ways: by suggesting a code based on a description of a good, and by verifying the selected code against the documents in the file. The first approach saves time during the search. The second, which is less often highlighted, helps prevent errors: it verifies that the code is consistent with the invoice, the technical data sheet, and other supporting documents, flags any inconsistencies, and explains its reasoning. In both cases, the decision and responsibility remain with the declarant.

Tariff classification is one of the most far-reaching decisions in a customs declaration. The code determines duties, import VAT, trade policy measures, and the required documentation. Yet it is also one of the most difficult: the Common Customs Tariff contains approximately 15,500 lines, according to French customs authorities. Let’s take a look at what AI actually brings to the table—and what it cannot do.

Why Tariff Classification Resists Automation

A three-tiered code

A commodity code consists of three levels (source: douane.gouv.fr):

LevelFiguresScopeUpdate
HS (Harmonized System)6Global, used by 195 countries, managed by the World Customs OrganizationAbout every 5 years
CN (Combined Nomenclature)8European Union: Import Duties, StatisticsEvery year
TARIC10European Union: Trade Policy Measures (Suspensions, Preferences, Prohibitions, Licenses, Antidumping)Live

In France, additional national codes supplement the TARIC for certain taxes. A tool that “finds the correct HS code” has therefore only done part of the job: it is often the 8th, 9th, and 10th digits that determine the duties or trigger a specific measure.

Rules of interpretation, not keywords

Classification is based on legally binding texts: the General Rules for the Interpretation of the Harmonized System (GRI), the wording of headings and subheadings, section and chapter notes, as well as the European Commission’s classification regulations. The explanatory notes of the WCO and the CN provide guidance on interpretation. Classification involves analyzing the substance, function, condition, composition, and sometimes the packaging of the goods: a commercial description is almost never sufficient on its own.

A Changing Nomenclature

The HS is revised approximately every five years; the next edition, HS2028, is scheduled to take effect on January 1, 2028. The CN is updated annually. A “standard” code that has been used for years for a particular customer may become incorrect overnight.

A responsibility that remains with the declarant

The declarant is responsible for the accuracy of the information declared (Article 15 of the Union Customs Code). An incorrect classification may result in the assessment of additional duties and taxes, penalties, or non-compliance with a measure (license, prohibition, anti-dumping). To ensure a correct classification, the operator may request a binding tariff information (BTI), which is free of charge and is binding on customs authorities throughout the EU for up to three years.

The Two Ways AI Helps with Ranking

1. Suggest a code

This is the most well-known use case. Based on a description (name, material, function, use), a model suggests one or more likely codes, often along with a confidence level and alternatives. Recent language models are capable of reasoning based on the description rather than on keywords.

The performance results are real but must be interpreted carefully. A study conducted with the Korean Customs Service (arXiv 2111.01663) achieved a 95.5% accuracy rate among the top three suggestions at the 6-digit subheading level, based on nearly 130,000 past declarations. This is a good result for search assistance, but it is not a guarantee of the correct 10-digit code.

2. Verify code against the file

This is the most useful function for a freight forwarder or customs broker—and the one that’s least often described. The code has already been suggested (by an employee, a client, a product file, the history, or AI); the task is to verify that it is consistent with all the information in the documents:

  • Do the description and specifications on the invoice and technical data sheet (material, composition, alcohol content, power, dimensions) match the wording of the code?
  • Is the code consistent with the other documents: DAE for excise-taxable products, health certificates, and licenses?
  • Are the TARIC provisions associated with the code being followed (required documents, requested preferences, restrictions)?
  • Does the code match the RTC on file for this item, or the codes typically used for this customer?

This verification process relies on document reconciliation: comparing data from different documents to see if they tell the same story. An AI that reads the entire file can spot errors that no suggestion tool—fed only a single description—can detect. This is the principle discussed in our article “Why Must a Logistics AI Agent Analyze the Entire File?”

Code suggestionCode Check
HomeA product descriptionThe selected code and the entire set of documents
Question asked"What's the code for this product?""Does this code hold up against the documents?"
MomentCreating an item, new productEach filing, before and after submission
Core ValueSave time on researchAvoiding Errors and Corrections
LimitIt depends on the quality of the descriptionDepends on whether the application is complete

A real-life example: grapes, wine, and pisco imported from Chile

This case study was presented by Docloop during a demonstration covered by *Profession Logistique* (No. 11, Fall 2026). An importer receives a shipment from Chile containing a mix of fresh grapes, wine, and pisco.

On paper, the classification seems straightforward: fresh grapes fall under Chapter 8 (heading 0806), wine under Chapter 22 (heading 2204), and pisco, a grape brandy, under heading 2208. But within the wine heading, the Combined Nomenclature distinguishes wines based on their actual alcohol content. The code selected did not take into account the alcohol content indicated in the documents—a typical error, according to Aymeric Le Page, CEO and co-founder of Docloop. 

The system flagged it by comparing the code to the data extracted from the documents. It suggested another code, explaining its reasoning in detail and in a deliberately humble tone: essentially, “I think this code is more likely to be correct, since the wine exceeds a certain alcohol content; I may be wrong, but here is my reasoning so you can decide.” In the same file, it also flagged a missing pisco certificate and a required DAE since the shipment contains alcohol: the code and the documents cross-check each other.

What this case shows is that the error was not apparent in either the code alone or the invoice alone, but only when the two were compared.

What AI Doesn't Do (and Shouldn't Do)

  • Decide on behalf of the declarant. AI may overlook a piece of context that is obvious to a human: a specific use, an undescribed condition of the goods, or case law. The decision and the signature remain human.
  • Replace the RTC. An AI suggestion has no legal standing. For a high-stakes product (high duties, anti-dumping measures, disputed classification), the RTC remains the only enforceable safeguard.
  • Classify without information. A label such as “spare parts” or “accessories” does not allow for reliable classification, whether by humans or AI. The correct approach for a tool is to request the missing information, not to guess.
  • Promising accuracy without defining it. Be wary of a claim of “99% accuracy” that doesn’t specify the precision level (6, 8, or 10 digits), the calculation method (first suggestion or first three suggestions), or the test set. For the record, the 99–99.5% accuracy claimed by Docloop in *Profession Logistique* refers to data extraction from documents, not classification: these are two different metrics.

Integrate AI into Your Classification Process in 5 Steps

1. Start with the documents, not the wording

Invoices, packing lists, technical data sheets, certificates: the more information the system has about the merchandise, the more reliable its suggestions and checks will be. The data extraction must retrieve the characteristics relevant to classification (material, composition, grade, function), including from documents written in Spanish, English, or Chinese. The difference between OCR and document-based AI in this regard is detailed in “OCR vs. Document-Based AI: What Are the Differences for Logistics?”

2. Make the Most of Your Datasets

Item files, standard codes by customer, RTCs on file, past decisions: these are internal business rules that supplement regulatory rules (RGI, notes, TARIC). A code that differs from the one used for the same item on the last ten occasions warrants an alert, as does a code that no longer corresponds to the current nomenclature.

3. Check each code before submission

Compare the code with the extracted characteristics, TARIC codes, and other documents in the file. Inconsistencies between the invoice, packing list, and shipping document—which often distort the description—are detailed in our article on detecting inconsistencies between the invoice, packing list, and bill of lading.

4. Require alerts with explanations

Each alert must explain why the code appears suspicious and which document it is based on. This allows the declarant to dismiss a false alert in a matter of seconds and to guard against the ever-possible “hallucinations” of an AI. Alerts must be delivered to the platforms where the team is already working: email, TMS, or customs clearance software.

5. Review the codes after submission

Reviewing submitted declarations helps identify recurring errors, correct product files, and prepare bill of materials updates (particularly HS 2028). For an Authorized Economic Operator, this review supports self-monitoring. According to Docloop, it also serves as a training tool: identifying common mistakes made by a junior employee helps teach them to avoid making those mistakes in the future.

What is automated, what remains the responsibility of the filer

TaskRole of AIRole of the Reporter
Extraction of Product CharacteristicsAutomaticCheck readings with a low confidence index
Search for Candidate CodesSuggestion with AlternativesMake a choice based on the RGI and the notes
Consistency Between Code, Designation, and DocumentsMonitoring and Alerts ExplainedSlice
Consistency with historical data and RTCsMonitoring and AlertsUpdate the repository if necessary
TARIC Measures and Required DocumentsAttendance TrackingValidate Exceptions
New, complex, or high-stakes productPreparation of ComponentsDecide whether to request an RTC if necessary
Signing of the declarationNoneDecision-Making and Responsibility

This principle of graduated human supervision is detailed in our article “Document-Centric Agentic AI: Definition.”

Do you want to be more productive?

Book a demo
Book a demo

How to Evaluate a Classification AI

Before choosing a tool, ask yourself these questions:

  1. At what level is the accuracy measured? SH at 6 digits, CN at 8, TARIC at 10?
  2. Based on what? The first suggestion or the first three? Based on which test set, from which sector?
  3. Does the tool read the documents, or just a description of them?
  4. Does it check existing code, or does it simply suggest some?
  5. Does he explain his proposals and warnings?
  6. Does it take into account your reference systems (standard codes, RTC) and bill of materials updates?
  7. Does it integrate with your tools without adding another screen?

The best way to test it is to try it out on your own past tax returns: compare the tool's alerts with the corrections you actually made.

Code verification is part of a broader process, described in our article “How to Automate Customs Document Verification,” and it is one of the checks performed by Docloop’s Customs Compliance Engine.

Docloop in *Profession Logistique*. In its Issue 11 (Fall 2026), the magazine devotes four pages to Docloop’s document reconciliation feature, including its ability to detect a tariff code that does not match a wine’s alcohol content. The reconciliation module is presented as currently being tested by several freight forwarders and customs brokers. Docloop was also a winner of the Tech for Change 2025 award at VivaTech and of the France 2030 call for projects organized by ADEME.

‍

FAQs
No items found.