Automatic Product Classification in International Trade: Machine Learning and Large Language Models

Peer Reviewed icon Peer Reviewed
Author
Date issued
July 2023
Subject
Export of Goods;
Customs Administration;
International Trade;
Machine Learning;
Small Business;
Artificial Intelligence;
Integration and Trade;
Rating;
Tariff System
JEL code
F10 - Trade: General;
C55 - Large Data Sets: Modeling and Analysis;
C81 - Methodology for Collecting, Estimating, and Organizing Microeconomic Data • Data Access;
C88 - Other Computer Software
Category
Working Papers
Accurately classifying products is essential in international trade. Virtually all countries categorize products into tariff lines using the Harmonized System (HS) nomenclature for both statistical and duty collection purposes. In this paper, we apply and assess several different algorithms to automatically classify products based on text descriptions. To do so, we use agricultural product descriptions from several public agencies, including customs authorities and the United States Department of Agriculture (USDA). We find that while traditional machine learning (ML) models tend to perform well within the dataset in which they were trained, their precision drops dramatically when implemented outside of it. In contrast, large language models (LLMs) such as GPT 3.5 show a consistently good performance across all datasets, with accuracy rates ranging between 60% and 90% depending on HS aggregation levels. Our analysis highlights the valuable role that artificial intelligence (AI) can play in facilitating product classification at scale and, more generally, in enhancing the categorization of unstructured data.
Generative AI enabled