← Long Nguyen
Applied AI · ADA (Data & AI) · 2023–Present

A judgment framework for AI product categorization

Why yes/no questions turned out to be smarter than asking AI to just ‘pick a category.’

LLMsPrompt DesignDecision FrameworksQA

The problem

Brands have hundreds of products, organized in hierarchies — milk, for example, splits into infant, children, adult, and specialty, each with its own sub-attributes:

MilkInfant: Stage 1, Stage 2, Stage 3InfantStage 1Stage 2Stage 3Children: By age, By flavor, By typeChildrenBy ageBy flavorBy typeAdult: Normal, FortifiedAdultNormalFortifiedSpecialty: Lactose-free, ClinicalSpecialtyLactose-freeClinicalPediaSure® 3+ Complete Nutrition for Children 3–10— Infant or Children’s nutrition?
PediaSure 3+ product photo
PediaSure® 3+ Complete Nutrition for Children Aged 3 to 10 — the actual product that broke our first version of the classifier.

We work with eCommerce data across millions of SKUs, and the obvious move is to ask an AI model to place each one. The problem is AI hallucinates and is inconsistent on anything ambiguous. Take “PediaSure® 3+ Complete Nutrition for Children Aged 3 to 10” above — is that infant nutrition (usually ages 1–5) or children's nutrition (usually 5+)? One model run says one thing, the next says another. My own team couldn't agree consistently either. What works when you adapt by hand for 1 client falls apart when you try to standardize across 10.

What I did

Instead of asking the model to place a product directly into a category hierarchy in one shot, I redesigned the task as a questionnaire — a path of yes/no (or ‘so-so,’ which routes to a clarifying follow-up) questions leading to the final category:

PRODUCT PediaSure® 3+ Complete Nutrition for Children Aged 3 to 10 QUESTION 1 Is it edible? yes Filter: not a food or beverage item FILTER Not a food or beverage item no QUESTION 2 Is it a dairy or milk product? no Filter: not a dairy or milk product FILTER Not a dairy or milk product yes QUESTION 3 Skews under age 5? yes Category: Infant / toddler CATEGORY Infant / toddler no QUESTION 4 Marketed for ages 5+? yes Category: Children’s nutrition CATEGORY Children’s nutrition no Category: General nutrition CATEGORY General nutrition

Yes/no is a far more objective thing to evaluate than ‘which category is this,’ and it gives the model one clear decision point at a time instead of one big ambiguous one — so each pass makes the model more reliable, not less. The most fun part was pulling in people from totally different teams to help shape the questionnaire — some had personal experience with these exact product categories through their own families, which turned out to be genuinely useful domain knowledge.

What happened

The structure held up in a way one-off manual adaptation never could — the same yes/no pathway now runs unattended across a much larger, messier product catalog, flagging category, differentiating pack size, and helping bundle products, and the model keeps getting more accurate with every pass instead of drifting.

Scaled from 1 client to 10+ using the same framework for category flagging, pack-size differentiation, and bundling
← Back to all projects