Caterpillar2026
Tariff classification at scale
A hybrid legal-and-engineering approach to tariff classification: a fine-tuned ModernBERT classifier for the cases that have precedent, and an agentic verifier for the ones that don't.
- Role
- AI Data Scientist
- Stack
- ModernBERTPyTorchLangGraphPythonAzure
The problem
Every part that crosses a border needs a tariff classification, which is a legal determination with duty costs attached. Caterpillar had a significant backlog (more than 1M parts), and the previous approach yielded 7% top-level accuracy, in large part because it was trying to solve the wrong problem.
It's partly a text-classification problem and partly a legal-reasoning problem. Treating it as only one of those is what held earlier attempts back.
Results
Manual classification effort dropped sharply. People now spend their time on the hard cases instead of all of them.
Approach
The classifier handles volume. Most parts look like something that has been classified before, and a fine-tuned encoder is fast, cheap, and very good at spotting that. It also knows when it isn't sure.
Those uncertain cases go to an agent that works the problem the way a trade-compliance specialist would: read the part, walk the schedule, and apply the rules in order, recording its rationale. It's slower per part, which is exactly why it only runs where precedent runs out.