Skip to content
Grocery retail chain, EU & US (under NDA) · Retail · Master data

Catalogue AI: classifying new SKUs and cleaning 182 000 product cards

Two models on the product catalogue of a grocery chain: one suggests the classification code and category for every new item with top-3 probabilities, the other finds duplicate product cards semantically. Category managers confirm with one click instead of searching the classifier by hand; every confirmation feeds back into training.

Duration
6 weeks to first results, 4 months total
Published
26 August 2026
Stack
Pythonscikit-learnSentence TransformersFAISSPostgreSQLFastAPIVueAirflow

−78%

time to classify a new SKU

91%

top-1 accuracy after six months

1 903

duplicate groups found in the first run

5/5

data readiness — no preparation needed

What was the starting point?

The starting point was a catalogue of 182 000 product cards fed by hundreds of suppliers and maintained by dozens of category managers in several countries, where every new SKU was classified by hand. Finding the right code in a classifier of about 1 400 leaf categories took roughly five minutes per item, and different managers read the classifier differently, so the catalogue drifted. The cost of that drift is not unusual: Gartner (2021) estimates that poor data quality costs organisations an average of 12.9 million dollars a year, and an HBR study (2017) found that only about 3% of companies’ data met basic quality standards.

The catalogue was also full of duplicates: the same product entered twice with different spellings, splitting sales analytics, doubling stock records and showing customers the same item twice online.

Both initiatives scored 5/5 on data readiness in Glanit’s registry — tens of thousands of historically classified SKUs with descriptions and attributes were already in the system — so they became the “quick win” track alongside the first wave of pilots.

What problem had to be solved?

Two problems had to be solved together: classifying every new SKU into one of about 1 400 leaf categories, and finding duplicate cards that exact string matching cannot see. Classification is a large multi-class problem with a long tail, multilingual descriptions and inconsistent supplier attributes. Duplicates differ in word order, units, abbreviations and language, so a name match finds almost nothing; even a shared GS1 barcode (GTIN) only catches the subset of duplicates where suppliers filled the field correctly. Both models had to plug into the existing item-onboarding process without a new tool to learn, and a human always had to confirm.

Top-3 suggestions inside the onboarding form

The category manager sees three ranked suggestions with probabilities and confirms with one key. Corrections go back into the training set the same night.

Catalogue AI interface: a new item with top-3 category suggestions and probabilities, accuracy chart and a list of duplicate candidates
New-item screen with top-3 classification, weekly accuracy on confirmed items, and ranked duplicate candidates.

How was it built?

It was built as two models behind one confirmation interface: a classifier that returns the top-3 category codes with calibrated probabilities, and a duplicate finder that embeds every card semantically and searches for near neighbours. Approximate nearest-neighbour search is the standard way to compare hundreds of thousands of embeddings quickly; the FAISS library used here was published by Meta researchers in 2017 and remains the reference implementation. Every human confirmation feeds a weekly retraining run.

  • Classifier. A gradient-boosted model over text embeddings (multilingual sentence transformers) and structured attributes (composition, brand, unit, storage), trained on the history of assigned codes. A confidence threshold decides whether the top-1 is pre-selected or the manager must choose.
  • Duplicate finder. Cards are embedded (name + attributes + barcode + description); FAISS produces candidate pairs, a pairwise model scores them, and candidates are grouped and ranked. Same-EAN pairs are surfaced first as certain duplicates.
  • Confirmation UI. A merge-review screen shows both cards with attribute completeness and stock coverage, proposes which card to keep, and records the decision. Regular reruns catch new duplicates as they are entered.
  • Retraining loop. Confirmations and corrections are collected daily; the classifier retrains weekly (Airflow) with an automatic accuracy gate before deployment.

Rule-based matching vs learned models: which finds duplicates and categories?

The table compares the rule-based approach the client had tried (keyword rules and exact matching) with the learned models that replaced it. Rules are transparent but brittle: each new supplier spelling needs a new rule. Learned models cost more to set up and need labelled history, but they generalise to spellings and languages nobody wrote a rule for.

Rule-based vs learned classification and duplicate detection
CriterionRules and exact matchingLearned models (this project)
Set-upFast, no training dataNeeds labelled history (here: tens of thousands of SKUs)
New suppliers and spellingsNew rule per caseGeneralise from embeddings
Multilingual namesSeparate rules per languageOne multilingual model
Duplicate recallSame string or same barcode onlySemantic neighbours plus barcode
ExplainabilityFullTop-3 with probabilities, evidence badges
MaintenanceRule set grows for everWeekly retraining from confirmations
Rule-based vs learned classification and duplicate detection

Results

Accuracy is measured on the items the category managers actually confirmed — the honest metric — and improved every week as corrections fed back into training.

Classification accuracy on confirmed items
  • Top-1
  • Top-3
0%25%50%75%100%W1W4W8W12W16W20W24W1 — Top-1: 79%W4 — Top-1: 84%W8 — Top-1: 87%W12 — Top-1: 89%W16 — Top-1: 90%W20 — Top-1: 91%W24 — Top-1: 92%92%W1 — Top-3: 93%W4 — Top-3: 96%W8 — Top-3: 97%W12 — Top-3: 98%W16 — Top-3: 98%W20 — Top-3: 99%W24 — Top-3: 99%99%
Data table
Top-1Top-3
W179%93%
W484%96%
W887%97%
W1289%98%
W1690%98%
W2091%99%
W2492%99%
Duplicate groups found by category, first full run
BeveragesBeverages: 412412DairyDairy: 318318HouseholdHousehold: 296296SnacksSnacks: 244244FrozenFrozen: 203203BakeryBakery: 176176Personal carePersonal care: 154154OtherOther: 100100
Data table
Groups
Beverages412
Dairy318
Household296
Snacks244
Frozen203
Bakery176
Personal care154
Other100

Merge review

Category managers process duplicate groups in a dedicated queue; most decisions take seconds because the evidence — same EAN, attribute completeness, where the stock is — is on the screen.

Duplicate review screen comparing two product cards, with counts of merged, kept and pending decisions
Merge review: side-by-side cards, evidence badges and the week's decisions.

Stack

The stack is Python end to end: scikit-learn and LightGBM for the classifier, Sentence Transformers for multilingual embeddings, FAISS for approximate nearest-neighbour search, FastAPI inference services, PostgreSQL for cards and decisions, and Airflow for weekly retraining and scheduled duplicate scans. The Vue confirmation interface is embedded in the existing item-onboarding tool through its API, so category managers never leave the screen they already use.

Who is this approach for?

This approach is for any company whose product master is maintained by people and fed by many suppliers: grocery and DIY retail, pharmacy chains, spare-parts distributors, marketplaces. Clean master data is the foundation half of an AI roadmap stands on — demand forecasting, substitutions for out-of-stock items and conversational BI all depend on one card per product. McKinsey (2023) puts the annual value of generative AI in retail at roughly 400–660 billion dollars, and most of that value assumes clean catalogue data. Regulation is pushing the same way: the EU Ecodesign Regulation (2024) introduces a Digital Product Passport that will require consistent product identifiers and attributes per item.

It is the project we recommend starting with when the data is ready and the business needs a visible result in weeks.

Frequently asked questions