Zing Forum

Reading

Deterministic Agent Workflow Solves Customs Code Classification Challenges: An Interpretable AI Solution for Multi-Dimensional Rule Reasoning

This article introduces a deterministic agent workflow to address the multi-dimensional rule reasoning challenges in customs HS code classification. The method achieves interpretable classification decisions by fixing the control flow and limiting the scope of language model calls, reaching a top-1 accuracy of 64.2% for six-digit codes.

智能体工作流HS编码分类多维度规则推理可解释AI海关税则确定性系统大语言模型应用
Published 2026-05-14 22:04Recent activity 2026-05-15 09:51Estimated read 5 min
Deterministic Agent Workflow Solves Customs Code Classification Challenges: An Interpretable AI Solution for Multi-Dimensional Rule Reasoning
1

Section 01

[Introduction] Deterministic Agent Workflow Solves Customs Code Classification Challenges

This article proposes a deterministic agent workflow aimed at addressing the multi-dimensional rule reasoning challenges in customs HS code classification. By fixing the control flow and limiting the scope of language model calls, this solution achieves interpretable classification decisions, reaching a top-1 accuracy of 64.2% in six-digit code classification tasks, providing a reliable approach for AI applications in high-compliance scenarios.

2

Section 02

Background and Challenges: Complexity of Customs Code Classification

Customs code classification is a high-risk, high-professional-threshold task in international trade, determining commodity tariffs, regulatory conditions, and trade statistical归属. The core challenge lies in multi-dimensional rule reasoning: it needs to simultaneously satisfy constraints such as material composition, functional use, and essential characteristics, and rules often conflict—classification experts must make judgments within a priority system. Traditional LLM end-to-end methods perform poorly because they struggle to handle multi-dimensional priority constraints.

3

Section 03

Core Innovation: Design Philosophy of the Deterministic Agent Workflow

The core design of the solution includes three elements: 1. Fixed control flow: A predefined six-stage pipeline with a deterministic and predictable process, ensuring stability and auditability; 2. Limited LLM call scope: Positioned as a "narrow-domain expert" focusing on specific subtasks (rule matching, feature extraction, etc.) to reduce hallucination risks; 3. Local reflection and verification: Self-correction within each stage without compromising overall determinism.

4

Section 04

Technical Architecture: Offline Knowledge Engineering and Online Pipeline

The system architecture consists of two parts: 1. Offline knowledge engineering: Structured processing of China's HS tariff rules, encoding the rule system (chapter notes, category notes, etc.) into a knowledge base; 2. Online six-stage pipeline: Transmitting information through structured intermediate representations via stages such as feature extraction, candidate screening, and conflict detection to ensure transparent and controllable reasoning.

5

Section 05

Experimental Results and Dataset Reflections

HSCodeComp benchmark evaluation results: Qwen3.6-plus achieves 75.0% top-1 accuracy for four-digit codes and 64.2% for six-digit codes; the open-source model Qwen3.6-27B-FP8 reaches 77.4% top-1 accuracy for six-digit codes, showing good model independence. Manual audits found that some annotations in the dataset deviate from general HS rules, so attention should be paid to the quality of benchmark data.

6

Section 06

Practical Significance and Insights

Four methodological insights: 1. Fixed control flow is more reliable than autonomous planning in high-risk scenarios; 2. Limiting the model's task scope improves output reliability; 3. Interpretability should be a design goal; 4. Knowledge engineering remains the foundation for building reliable systems in professional fields.

7

Section 07

Conclusion: A Reference Paradigm for Multi-Dimensional Rule Reasoning

Customs code classification is a typical problem of multi-dimensional rule reasoning, and similar challenges exist in fields such as law and medicine. The deterministic agent workflow paradigm of this study provides a reference approach for AI applications that balance intelligence with interpretability and auditability.