Automating E-Commerce Product Catalog Enrichment Using Serverless Customization of Open-Weight Models with Amazon SageMaker

Managing massive electronic retail inventories presents a persistent data hygiene challenge for modern merchandising teams. Product catalogs rarely arrive as clean, uniform, and structured attributes. Instead, product descriptions, titles, and category pathways originate from disparate supplier feeds, legacy databases, and dynamic web scrapers, changing continuously. Effective site search, personalized recommendation engines, and intuitive catalog navigation rely heavily on consistent, accurate product tagging. Yet, manually applying these metadata tags across hundreds of thousands of stock keeping units (SKUs) is prohibitively slow, expensive, and prone to human error or drift.
To solve this operational bottleneck, engineering organizations have increasingly turned to generative artificial intelligence. While general-purpose frontier large language models can generate metadata tags through prompt engineering, high-volume production catalog workflows usually demand a narrower, more specialized objective: returning exact attributes within a rigid schema, consistently and at scale. When a taxonomy is stable and the resultant output can be scored programmatically, customizing a smaller open-weight model frequently proves to be a superior engineering strategy. This approach enables developers to embed the exact schema directly into the model weights, optimize the delicate operational trade-off between missing tags and extraneous tags, and bypass the recurring cost of paying for generalized capabilities that a rigid tagging workflow simply does not require.
Evolution of Enterprise Machine Learning Infrastructure
The traditional approach to fine-tuning machine learning models for specific enterprise tasks involved provisioning dedicated graphics processing unit (GPU) instances, configuring complex training clusters, and managing containerized software environments. While powerful, this infrastructure overhead introduced significant friction for data science teams.
Amazon Web Services (AWS) addressed this paradigm shift by introducing serverless model customization within Amazon SageMaker. Utilizing the Amazon SageMaker Python SDK v3, developers can now execute advanced fine-tuning workflows—such as Supervised Fine-Tuning (SFT) and Reinforcement Learning with Verifiable Rewards (RLVR)—without manually selecting, provisioning, or deprovisioning underlying compute instances. When compute configurations are omitted from the training trainer instantiation, SageMaker automatically handles the dynamic allocation and release of training capacity. This serverless capability drastically reduces operational overhead, allowing machine learning practitioners to focus entirely on dataset curation, reward function design, and model evaluation.
Step-by-Step Implementation of the Tagging Workflow
The technical implementation of the automated catalog enrichment architecture is systematically divided into three core operational phases: data preparation, serverless model customization, and scalable asynchronous inference.
Data Sourcing and Preparation
The foundational workflow initiates with publicly available or proprietary retail records—such as the Amazon Sales Dataset from Kaggle, containing over 1,000 diverse product records encompassing product identifiers, titles, category strings, pricing, consumer ratings, and detailed descriptions. In a production environment, organizations substitute these with their own approved, proprietary product catalogs and trusted human-verified labels.

To ensure repeatability and auditability, data transformation is executed via an Amazon SageMaker Processing job. The processing script extracts raw records from Amazon Simple Storage Service (Amazon S3), normalizes messy catalog text, strips out unusable or malformed rows, maps validated product information into a standardized nine-category tagging target schema, and partitions the data into distinct training and validation sets. These processed subsets are serialized into JSONL (JSON Lines) files and uploaded back to S3 before being officially registered as versioned datasets within the Amazon SageMaker AI Registry. Each training record structures conversation turns into system, user, and assistant roles, explicitly teaching the model how to map raw input text to the precise, multi-line nine-category output required by downstream business logic.
Supervised Fine-Tuning (SFT) with Qwen3-8B
With the versioned dataset ARNs registered, the workflow proceeds to adapt the Qwen3-8B open-weight model. Utilizing the SFTTrainer class from the SageMaker Python SDK v3, the system applies Low-Rank Adaptation (LoRA) to efficiently modify the model parameters. The trainer ingests the training and validation data, adheres to a strict 4K sequence length, and publishes the resulting model artifacts directly to a designated model package group. Because the training job operates under serverless model customization, AWS dynamically manages the compute capacity behind the scenes.
Supervised fine-tuning provides the most dramatic initial leap in schema adherence and formatting capabilities, teaching the model the precise input-output grammar required for the enterprise task. However, while SFT ensures structural compliance, models trained solely via supervised methods often exhibit residual flaws—occasionally omitting valid attributes or hallucinating unnecessary tags.
Reinforcement Learning with Verifiable Rewards (RLVR)
To refine the model beyond the limitations of supervised fine-tuning, the workflow transitions to Reinforcement Learning with Verifiable Rewards using Group Relative Policy Optimization (GRPO). Supervised examples are programmatically converted into RLVR-compatible structures, where prompts retain the system and user conversation turns, while expected assistant outputs are designated as ground truth references for a rule-based reward model.
The RLVRTrainer takes the SFT model package and evaluates candidate completions against a deterministic, rule-based reward function. By setting rollout_n=8, the framework generates eight distinct completions for every single prompt. Each completion is independently scored using a mathematical composite of recall, precision, accuracy, match quality, and formatting adherence:
$$textOverall = 0.30 times textrecall + 0.30 times textprecision + 0.30 times textaccuracy + 0.05 times textmatch_quality + 0.05 times textformatting$$
A crucial innovation of this training methodology is the application of a progressive reward schedule. Early training iterations place heavier emphasis on recall, ensuring the model learns not to miss vital product attributes. Later training phases dynamically shift focus toward precision, penalizing the generation of unsupported or extraneous tags. This explicit reward design bides direct business priorities into the optimization loop, preventing the model from drifting into unwanted behavioral patterns through Kullback-Leibler (KL) regularization.

Production Deployment via Asynchronous Inference
Once training and reinforcement optimization conclude, the finalized model package must be transitioned to a production serving environment. While training leverages serverless execution, real-world catalog enrichment is inherently batch-oriented and asynchronous.
Organizations deploy the optimized model to an Amazon SageMaker Asynchronous Inference endpoint backed by a provisioned ml.g6.2xlarge instance equipped with custom vLLM serving containers. Asynchronous inference queues incoming payload requests, allowing merchants to submit massive batches of thousands of SKUs simultaneously without risking HTTP timeouts. Requests and responses are seamlessly managed via Amazon S3 buckets, where large JSON payloads are uploaded, processed, and written out automatically. For high-volume enterprise operations, administrators can attach automated scaling policies to scale the endpoint worker count dynamically based on queue depth, scaling down to zero resource consumption during idle periods.
Quantitative Evaluation and Business Implications
Rigorous empirical evaluation confirms the distinct performance contributions of each training phase. Baseline open-weight models achieve an overall composite score of just 0.354, struggling heavily with strict retail schemas. Following Supervised Fine-Tuning, the overall composite score surges to 0.6827, driven by a massive improvement in recall (jumping from 0.327 to 0.6689) and precision (climbing from 0.397 to 0.652).
| Model Variant | Overall Score | Recall | Precision | Accuracy |
|---|---|---|---|---|
| Baseline | 0.3540 | 0.3270 | 0.3970 | 0.3270 |
| Supervised Fine-Tuning (SFT) | 0.6827 | 0.6689 | 0.6520 | 0.6689 |
| RLVR (GRPO) | 0.6941 | 0.7030 | 0.6380 | 0.6860 |
The introduction of GRPO reinforcement learning further refines the output, raising the overall score to 0.6941 and pushing recall to an impressive 0.703. While precision experiences a minor, intentional dip from 0.652 to 0.638 as a byproduct of maximizing attribute coverage, this shift provides valuable strategic flexibility for catalog management teams.
For retail organizations where failing to tag an attribute incurs a high business cost—such as rendering an item invisible to specific faceted search filters—favoring higher recall via GRPO is highly advantageous. Conversely, if downstream applications suffer from extraneous metadata, reward weights can be easily re-calibrated to prioritize precision. These automated metrics serve as reliable model-selection signals, which merchandising teams can subsequently validate against real-world key performance indicators, including manual curation correction rates, attribute completeness percentages, and improvements in recommendation click-through rates.
Conclusion
Automating product catalog enrichment using serverless model customization represents a mature, highly cost-effective architectural pattern for modern e-commerce enterprises. By combining the foundational instruction-following capabilities of open-weight models like Qwen3-8B with serverless SFT and verifiable reinforcement learning via SageMaker, organizations can specialize powerful models without the operational friction of managing dedicated training infrastructure.
While general frontier models retain distinct advantages for fluid, rapidly evolving taxonomies, stable and high-volume tagging workflows achieve superior cost-efficiency and performance through domain-specific customization. By making business rules mathematically explicit within deterministic reward functions, technical teams can successfully align automated machine learning outputs with precise commercial objectives, transforming chaotic supplier data into structured, revenue-driving catalog assets.







