
AI product classifiers hand you category IDs that don't exist. Here's how we stopped ours.
- ACJ Labs
- Engineering
- 23 Jul, 2026
Ask a capable AI model to classify a product into Google’s Product Taxonomy and it will do something
unsettling: return an ID that looks completely valid — right format, plausible category name — and
is simply wrong. We caught our own catalog classifier doing exactly this: it labelled an insulated
winter parka as ID 212, “Shirts & Tops.” Confident, specific, and incorrect (a parka is 5598,
“Coats & Jackets”). The model wasn’t hedging; it was fabricating.
The fix wasn’t a better prompt. It was to stop trusting the model’s memory. We now retrieve real
candidate categories from the current taxonomy file and ground every classification against them —
so the service returns a real leaf_id or an honest null, never an invented one. Measured against
our evaluation set on the live service: 11 of 12 exact matches.
There’s a second, honest half to this. Accuracy tracks the quality of what you give it. Hand the service only a bare product title and it will still ground its answer in a real node — but a less certain one, and it tells you so with a lower confidence score instead of a false green light. Give it the full catalog record and it’s confident and correct. That’s the whole point: a classifier that knows what it doesn’t know is more useful than one that’s confidently wrong.
We also published the verification piece as a standalone open-source package: @acjlabs/google-taxonomy-verify — the same check our product runs, free.

