Vision Language Models for Large-Scale Product Classification and Understanding

shopify · E-commerce · 2025 · source Agentic: no · promotional bias: med · source-backed · extracted with prompt 0.5.6 (schema v2)

Generated from extraction.json — do not edit by hand. Every claim cites verbatim source evidence; stated means the quote directly asserts the claim, implied means it supports it indirectly.

Problem

Domain: E-commerce product understanding and classification

Shopify needed to classify and enrich diverse merchant products at massive scale so search, recommendations, tax, content safety, and catalog organization could use consistent category and attribute data.

Constraints:

Architecture

Shopify built a near-real-time two-stage Vision Language Model pipeline on Dataflow and Kubernetes. Product data is validated and batched, a Vision LM first predicts category and simplified description against the Shopify Product Taxonomy, a second call predicts category-specific attributes, consistency management retries partial failures, and output processing validates results against taxonomy rules before downstream product surfaces consume them.

Diagram confidence: explicit (topology described by the source).

flowchart LR
  product-input-stream["Product input stream"] --> dataflow-pipeline["Dataflow pipeline"]
  dataflow-pipeline --> vision-lm-service["Vision LM service"]
  vision-lm-service --> shopify-product-taxonomy["Shopify Product Taxonomy"]
  vision-lm-service --> dynamo-serving-stack["Dynamo serving stack"]
  dynamo-serving-stack --> kubernetes-gpu-cluster["Kubernetes GPU cluster"]
  dataflow-pipeline --> consistency-manager["Consistency manager"]
  consistency-manager --> output-processor["Output processor"]
  shopify-product-taxonomy --> output-processor
  output-processor --> downstream-commerce-surfaces["Downstream commerce surfaces"]
Drag to pan · scroll or use +/− to zoom · reconstructed from the source's described component topology

Components

Component Role Interacts with
Product input stream Incoming product records, images, and text needing classification and attribute extraction. Dataflow pipeline
Dataflow pipeline Orchestrates near-real-time processing, validation, request batching, and prediction flow. Product input stream, Vision LM service, Consistency manager
Vision LM service Runs VLM inference for category and attribute predictions. Dataflow pipeline, Shopify Product Taxonomy, Dynamo serving stack
Dynamo serving stack Provides in-flight batching and GPU serving for optimized Qwen2VL inference. Vision LM service, Kubernetes GPU cluster
Kubernetes GPU cluster Hosts the VLM serving workload with NVIDIA GPUs. Dynamo serving stack
Shopify Product Taxonomy Defines categories, hierarchical relationships, attributes, standardized values, and crosswalks. Vision LM service, Output processor
Consistency manager Ensures category and attribute predictions succeed together and retries partial failures. Dataflow pipeline, Output processor
Output processor Validates, formats, stores, and notifies downstream systems about completed predictions. Consistency manager, Shopify Product Taxonomy, Downstream commerce surfaces
Downstream commerce surfaces Search, recommendations, tax, content safety, and catalog features that consume product understanding outputs. Output processor

Data flow

Product records enter a Dataflow pipeline, are dynamically batched and validated, pass through a Vision LM service on Kubernetes GPUs, receive category predictions first, then attribute predictions using category context, and finally undergo taxonomy validation and storage for search, recommendations, tax, and trust-and-safety use cases.

3 supporting quotes
“The near real-time processing pipeline runs on a Dataflow pipeline that orchestrates the end-to-end process.”summary, stated
“It makes two separate calls to the Vision LM service—first for category prediction, then for attribute prediction based on the predicted category.”summary, stated
“Output Processing validates results against taxonomy rules, formats and stores results, and sends notifications for completed predictions.”summary, implied

Why this architecture

The two-stage VLM architecture matches Shopify's taxonomy problem: category prediction must establish context before attributes can be extracted consistently, while FP8 quantization, in-flight batching, and KV cache reuse make the workload viable at 30-million-prediction daily scale.

“Two-Stage Prediction performs category prediction with simplified description generation first, followed by attribute prediction using category context.”summary, stated
“The production deployment employs several sophisticated optimization techniques that are critical for achieving the required throughput:”summary, stated

Models used: Qwen2VL 7B · LLaVA 1.5 7B · LLaMA 3.2 11B · Vision Language Models · Multi-LLM annotation system

Scale

Alternatives considered (roads not taken)

Traditional TF-IDF and logistic regression classifiers

Rejected because: They worked for simple cases but struggled with Shopify's product diversity.

“In 2018, they started with basic logistic regression and TF-IDF classifiers—traditional machine learning methods that worked for simple cases but struggled with product diversity.”summary, stated

Category-only classification

Rejected because: Shopify needed granular product understanding, attributes, descriptions, content tags, and trust-and-safety features.

“By 2023, they identified that category classification alone was insufficient.”summary, stated

Fixed batch serving

Rejected because: In-flight batching better matched real-time arrival patterns and GPU utilization.

“Rather than pre-defining fixed batch sizes, the system dynamically groups incoming product requests based on real-time arrival patterns.”summary, stated

Patterns

model-routing (model operations)

Shopify evaluates and transitions between VLM generations by comparing both quality and compute cost, rather than always selecting the newest model.

“Each transition was evaluated against the existing pipeline considering both performance metrics and computational costs.”summary, stated

latency-optimization (serving)

FP8 quantization, in-flight batching, and KV cache reuse improve inference throughput for the two-stage VLM workload.

“FP8 Quantization is used for the Qwen2VL model, providing reduced GPU memory footprint for efficient resource utilization, minimal impact on prediction accuracy,”summary, stated
“KV Cache Optimization stores and reuses previously computed attention patterns for improved LLM inference speed.”summary, stated

data-quality-loop (training data)

A multi-LLM annotation, arbitration, and human-validation system improves product taxonomy training data and edge-case handling.

“A Multi-LLM Annotation System where several large language models independently evaluate each product. Structured prompting maintains annotation quality, and products receive multiple independent annotations for robustness.”summary, stated
“A Human Validation Layer provides strategic manual review of complex edge cases and novel product types. This creates a continuous feedback loop for improvement and includes regular quality audits.”summary, stated

structured-output-contract (taxonomy)

Predictions are constrained and validated against Shopify's taxonomy categories, attributes, standardized values, and rules.

“Output Processing validates results against taxonomy rules, formats and stores results, and sends notifications for completed predictions.”summary, stated

Tradeoffs

Optimize Qwen2VL 7B instead of chasing larger VLMs

Chose A 7B VLM with FP8 quantization and serving optimizations over A larger or newer model without regard to serving cost.

Rationale: The system needed enough multimodal quality at daily production throughput.

“This demonstrates a mature LLMOps practice of balancing prediction quality with operational efficiency rather than simply chasing the largest or newest models.”summary, stated

Use two sequential prediction calls

Chose Category prediction followed by attribute prediction using category context over One combined prediction call.

Rationale: Attributes are category-specific, so category context improves structured attribute extraction.

“Two-Stage Prediction performs category prediction with simplified description generation first, followed by attribute prediction using category context.”summary, stated

Use LLMs for annotation but keep arbitration and human validation

Chose Multi-LLM annotation plus judge models and strategic manual review over Single-model automatic labels.

Rationale: The taxonomy needs robust training labels for edge cases and novel products.

“An Arbitration System employs specialized models acting as impartial judges to resolve conflicts when annotations disagree.”summary, stated

Gotchas (what bit them)

Category-only product understanding was too shallow.

Root cause: Search, recommendations, tax, content safety, and catalog organization needed attributes, descriptions, and trust signals beyond category labels.

Resolution: Use a two-stage VLM pipeline that predicts categories first and then category-specific attributes.

“They needed granular product understanding, consistent taxonomy, meaningful attribute extraction, simplified descriptions, content tags, and trust and safety features.”summary, stated

Throughput requirements forced inference optimization.

Root cause: Large VLMs were being used for more than 30 million daily predictions.

Resolution: Combine FP8 quantization, in-flight batching, KV cache optimization, and Kubernetes GPU serving.

“In-Flight Batching through NVIDIA Dynamo improves throughput through dynamic request handling. Rather than pre-defining fixed batch sizes, the system dynamically groups incoming product requests based on real-time arrival patterns.”summary, stated
“The service runs on a Kubernetes cluster with NVIDIA GPUs, using Dynamo for model serving.”summary, stated

The reported acceptance rate still leaves a large review tail.

Root cause: Even a high percentage error or intervention rate becomes large at Shopify's daily prediction volume.

Resolution: Keep merchant intervention and quality feedback in the operating model instead of treating 85% acceptance as full automation.

“The 85% acceptance rate, while high, still means that 15% of predictions require merchant intervention—at 30 million daily predictions, this represents millions of products needing review.”summary, stated

Evaluation

Shopify evaluates the system through merchant acceptance, hierarchical precision and recall, model-generation comparisons, taxonomy validation, annotation audits, and downstream product-quality indicators.

Metrics: 85% merchant acceptance rate · Over 30 million daily predictions · Doubled hierarchical precision and recall · 10,000+ categories · 1,000+ associated attributes

3 supporting quotes
“Hierarchical precision and recall have doubled compared to the earlier neural network approach. The structured attribute system spans all product categories, and automated content screening has been enhanced for trust and safety.”summary, stated
“A Human Validation Layer provides strategic manual review of complex edge cases and novel product types. This creates a continuous feedback loop for improvement and includes regular quality audits.”summary, stated
“The model selection process emphasizing efficiency alongside performance is practical, but the specific accuracy metrics for each model generation are not disclosed.”summary, implied

Outcomes

The system runs more than 30 million predictions daily across a taxonomy with more than 10,000 categories and 1,000 attributes.

“Enhanced product discoverability, consistent catalog organization, better search relevance, precise tax calculations, and reduced manual effort through automated attribute tagging are all reported benefits.”summary, stated
“At the platform level, the system processes over 30 million predictions daily. Hierarchical precision and recall have doubled compared to the earlier neural network approach.”summary, stated