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.
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.
| Criterion | Rules and exact matching | Learned models (this project) |
|---|---|---|
| Set-up | Fast, no training data | Needs labelled history (here: tens of thousands of SKUs) |
| New suppliers and spellings | New rule per case | Generalise from embeddings |
| Multilingual names | Separate rules per language | One multilingual model |
| Duplicate recall | Same string or same barcode only | Semantic neighbours plus barcode |
| Explainability | Full | Top-3 with probabilities, evidence badges |
| Maintenance | Rule set grows for ever | Weekly retraining from confirmations |
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.
- Top-1
- Top-3
Data table
| Top-1 | Top-3 | |
|---|---|---|
| W1 | 79% | 93% |
| W4 | 84% | 96% |
| W8 | 87% | 97% |
| W12 | 89% | 98% |
| W16 | 90% | 98% |
| W20 | 91% | 99% |
| W24 | 92% | 99% |
Data table
| Groups | |
|---|---|
| Beverages | 412 |
| Dairy | 318 |
| Household | 296 |
| Snacks | 244 |
| Frozen | 203 |
| Bakery | 176 |
| Personal care | 154 |
| Other | 100 |
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.
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
Services behind this case
Services
AI & Machine Learning
AI agents, LLM pipelines with retrieval, forecasting, computer vision and document AI — built into your product and measured by before/after numbers.
AI & Machine Learning
Free Open-Source AI Chatbot for Business Automation
Discover Glanit's open-source AI chatbot solution. Automate customer support 24/7 using Grok, Gemini, and ChatGPT. A self-hosted, free alternative to expensive SaaS tools—pay only for API usage.
AI & Machine Learning
How AI agents work: architecture of a production agent
An AI agent is not a chatbot with a longer prompt. It is a system: a model for reasoning wrapped in perception, memory, tools, orchestration and monitoring. We build agents for clients and for our own products — this is the architecture behind them.
More case studies
AI knowledge assistants for a 30 000-employee grocery chain
Three RAG assistants on one platform — for commercial staff, store directors (by voice, from the shop floor) and HR — answer questions from corporate regulations with a citation to the exact clause, or say honestly that they do not know — so staff stop phoning head office for routine questions.
- Retail
- Python
- LangChain
- PostgreSQL + pgvector
Document AI that reads 1 300 supplier invoices a day
Scans and photos of invoices, delivery notes and acts go through a multimodal model that extracts typed fields with a confidence score per field, reconciles them with the supplier and contract master data, and posts to the ERP. Only low-confidence documents reach a human — roughly one in nine.
- Retail · Finance
- Python
- PyTorch
- Multimodal LLM
Voice of customer: 12 review sources, one AI-classified stream
Reviews from maps, app stores, social networks, the hotline and the in-store complaint book flow into one system that classifies each by topic, sentiment, store and severity, escalates critical ones to the responsible manager within minutes, and gives management a live, per-store picture instead of a monthly digest.
- Retail · Customer experience
- Python
- Transformers
- PostgreSQL