← All work

ML Product Mapping System

A multi-model machine learning ensemble (PyTorch Bi-Encoder, Cross-Encoder, XGBoost, Random Forest, & Online Active Learner) that automatically maps distributor descriptions across DBC Group brands (Rucika, Djabesmen, RB Shera, Superex) to internal Master SKUs with 95.4% precision.

PythonPyTorch Bi-EncoderCross-Encoder TransformerXGBoostRandom ForestScikit-Learn (SGD Active Learner)TF-IDF & Fuzzy Matching

Problem

Thousands of unstandardized supplier Purchase Orders and invoices arrived with inconsistent dimension formats (1/2" vs 0.5", AW vs D pipe classes, threaded vs plain fittings). Manual reconciliation across tens of thousands of SKUs took days each month and caused costly fulfillment errors.

Data

The working records and data signals are described in the local project narrative below.

Approach

Engineered a 6-component hybrid hierarchical ensemble combining 384-dimensional Bi-Encoder retrieval (~3ms), Cross-Encoder transformer re-ranking, XGBoost, Random Forest, and a sub-millisecond Online Active Learning feedback loop.

System

NOTE

Executive Summary & System Architecture:

- Core Challenge: Ingestion of unstandardized supplier Purchase Orders with highly noisy shorthand (*"RCK PPA AW 1/2 IN"* vs *"PIPA PVC RUCIKA STD AW 0.5 INCH"*) caused severe fulfillment mismatches and 3-day manual audit backlogs.

- Technical Solution: Built a 6-component hierarchical ML ensemble combining 384-dimensional dense vector search (~3ms), Cross-Encoder transformer re-ranking, XGBoost, Random Forest, and an online sub-millisecond active learning loop.

- Quantified Impact: Reached 95.4% precision on auto-approved mappings, automated >80% of PO lines with zero manual intervention, and slashed month-end reconciliation time by 99.1% (from 3 days to <5 minutes) across 4 major industrial brands.


01. Problem Context: Fragmented Distributor Taxonomy

Across DBC Group (Djabesmen Group), thousands of Purchase Orders and invoice lines arrive daily from independent distributor networks for 4 manufacturing brands:

  1. Rucika: PVC pipes (Class AW/D), PPR/HDPE pipes, and specialized plumbing fittings.
  2. Djabesmen: Corrugated fiber-cement roofing sheets and ridge cap accessories.
  3. RB Shera: Fiber cement decorative boards and wood-grain textured planks.
  4. Superex: Rainwater drainage gutter systems and industrial PVC fittings.

Critical Operational Bottlenecks:

  • Unstructured Input Shorthand: Inconsistent abbreviations (1/2" vs 0.5", AW vs D pressure ratings) caused manual spreadsheet mapping delays.
  • High-Risk Specification Mismatch: Conflating high-pressure Class AW pipes with thin Class D drainage pipes caused critical logistics dispatch errors.
  • Manual Overhead: Required 3 full business days at month-end to reconcile inventory cross-references.

02. The 5-Model + TF-IDF Hierarchical Ensemble

To achieve sub-50ms latency with 95%+ precision, the system implements a weighted hierarchical decision pipeline:

Mathematical Model • Econometric FormulationSPECIFICATION
Final Score = 0.20 × M₁ + 0.25 × M₂ + 0.20 × M_3 + 0.15 × M_4 + 0.10 × M_5 + 0.10 × TF-IDF
ComponentModel ArchitectureLatencySpecialized Operational Role
Model 1 (20%)PyTorch Bi-Encoder~3ms384-d dense embeddings for fast candidate retrieval (Top 30 SKUs).
Model 2 (25%)Cross-Encoder Re-Ranker~18msTransformer cross-attention evaluating fine-grained specs (AW vs D, threading).
Model 3 (20%)XGBoost Classifier~2msGradient-boosted decision trees over 8 lexical and statistical features.
Model 4 (15%)Random Forest (100 Trees)~2msBagged meta-ensemble regularizing sparse or rare SKU variants.
Model 5 (10%)Online Active Learner<1msIncremental SGDClassifier absorbing operator feedback in real time.
TF-IDF (10%)Character N-Gram Vectorizer<1msSub-word character matching to handle severe distributor typos.

03. Operational Workflow: 3-Tier Confidence Triage

MERMAID
10 LINES
flowchart TD
    A["Distributor PO / Invoice Text"] --> B["Text Preprocessing & Dimension Normalization<br/>(Regex inch-mm, brand aliases, specs)"]
    B --> C["Hierarchical Ensemble Scoring<br/>(Bi-Encoder ➔ Cross-Encoder ➔ XGBoost ➔ RF)"]
    C --> D{"Confidence Triage"}
    D -->|"Score ≥ 85%: Auto-Approve"| E["ERP SAP Master SKU<br/>(>80% PO Volume, 95.4% Precision)"]
    D -->|"Score 60-85%: Review Queue"| F["Human Review Queue<br/>(Top 3 Suggestions)"]
    D -->|"Score < 60%: Anomaly Flag"| G["Master Data Triage<br/>(New Uncataloged SKU)"]
    F --> H["Operator Validates Choice"]
    H --> I["Online Active Learner<br/>(Incremental SGD Update <1ms)"]
    I --> E

Confidence Tier Specifications:

  1. Tier 1: Auto-Approved (Score ≥ 85%): Covers >80% of daily PO volume, directly synchronizing with the SAP ERP system with 95.4% precision.
  2. Tier 2: Human Review Queue (Score 60%–85%): Surfaces the Top 3 recommended candidates. Operator clicks update the online active learner in <1ms.
  3. Tier 3: Anomaly / Uncataloged Flag (Score < 60%): Isolates new unreleased product lines for Master Data team cataloging.

04. Multi-Brand Transformation Matrix

Production transformation examples across DBC Group divisions:

BrandRaw Distributor Description (Input)Standardized Master SKU (Output)ScoreStatus
RucikaRCK PPA AW 1/2 INCH X 4M PUTIHRUCIKA-PVC-AW-050-4M-WHT (Pipa PVC Standard AW 1/2" 4M)98.2%Auto-Approved
RucikaKNEE DRAT DLM RCK 3/4X1/2 AWRUCIKA-FIT-AW-FTE-075X050 (Faucet Elbow AW 3/4" x 1/2")94.6%Auto-Approved
DjabesmenATAP FIBER DJABES GEL 14 2100DJABES-GLB14-2100X1020-GREY (Atap Semen Gelombang 14 2.10M)96.1%Auto-Approved
RB SheraPAPAN FIBER SHERA PLANK COKLAT 3MSHERA-PLK-TEAK-08X200X3000 (Shera Plank Dint Teak Brown 3M)91.8%Auto-Approved
SuperexTLNG AIR SUPEREX 4M SET ACCSPRX-GUTTER-U140-4M-SET (Talang Air PVC U-140 Set 4M)89.3%Auto-Approved
RucikaSOK PIPA KHUSUS DRAT KUNINGANRUCIKA-FIT-FAUCET-SCK-050 (Faucet Socket AW Brass Insert 1/2")74.5%Reviewed (Top 1)

05. Measurable Enterprise Business Impact

Operational MetricBefore ML AutomationAfter ML DeploymentEnterprise ROI
Batch Reconciliation Time3 Full Business Days< 5 Minutes99.1% Turnaround Reduction
Automated PO Volume0% (100% manual review)> 80% Zero-Touch4.2 FTE Labor Hours Saved Daily
Auto-Approved PrecisionN/A95.4% Audited PrecisionZero Schedule AW/D Mismatches
Model Retraining DowntimePeriodic Batch Retraining< 1ms Online Incremental UpdateZero Operational Interruption

06. Strategic Machine Learning Lessons

  1. Ensemble Diversity Over Single Models: Combining dense embeddings with decision trees and character n-grams overcomes the limitations of any single NLP model.
  2. Calibrated Confidence Tiers: Enforcing an explicit human-in-the-loop review queue for ambiguous items builds organizational trust and safeguards inventory accuracy.
  3. Sub-Millisecond Active Learning: Continuous incremental learning from daily operator corrections prevents repeating identical manual fixes.

Impact

Achieved 95.4% precision on auto-approved mappings, automated >80% of PO lines without manual touch, and slashed batch processing turnaround from 3 business days to under 5 minutes across 4 manufacturing brands.

Lessons

  • Multi-model ensembles provide significantly greater robustness against extreme technical phrasing variations than any single NLP model.
  • Strict confidence tiering (Auto-Approve vs Human Review Queue) is critical for enterprise operational trust and zero-downtime adoption.
  • Online incremental learning ensures continuous model improvement without requiring heavy, disruptive batch retraining pipelines.