Generative AI: Bedrock & Batch for Scalable Product Data Categorization

Categorizing at scale 1000s of products using Amazon Bedrock and AWS Batch

Opportunity / Customer Challenge

A major player in the retail sector, dealing with vast product catalogs, faced a critical business bottleneck: their product data categorization process was entirely manual.

The process relied heavily on specialized subject matter experts who could categorize a maximum of 30 products per hour with high accuracy (95%+). While quality was maintained, this human-driven approach was non-scalable. With a crucial business initiative to rapidly onboard and list hundreds of thousands of new products annually, this slow, specialized process created an insurmountable backlog. This bottleneck severely hindered the company’s growth, time-to-market, and ability to generate revenue from their full product catalog. The core requirement was transforming this highly specialized, slow, manual process into a scalable, automated Generative AI solution without sacrificing the required data quality.

Solution

We engineered a decoupled, event-driven, and highly concurrent Generative AI pipeline on AWS, fundamentally transforming the customer’s product categorization workflow. The solution is designed to achieve concurrency and cost-efficiency at a massive scale using Amazon Bedrock and AWS Batch.

Architecture Highlights

The solution utilizes a two-layer architecture:

  1. Data Ingestion Layer: Raw product data files are uploaded to an input S3 bucket. An S3 event triggers an AWS Lambda function, which efficiently splits the file into chunks to prepare for parallel processing. These chunks then trigger messages to an SQS queue, ensuring the ingestion layer is fully decoupled from the processing layer.
  2. Processing Layer (Designed for Concurrency):
    • A second Lambda function polls the SQS queue, leveraging Event Source Mapping to enforce necessary throttling and manage workflow stability.
    • The Lambda submits jobs to AWS Batch, which executes high-volume workloads using ECS Fargate containers.
    • The containers first enrich the product data via an external API (Tavily), caching results in Amazon DynamoDB for efficiency.
    • The core categorization happens via Amazon Bedrock, utilizing the Anthropic Claude 4 Sonnet model. The prompt is meticulously optimized, incorporating the product description and the customer’s internal product taxonomy to maximize categorization accuracy.
    • The final categorized data is stored in an output S3 bucket, ready for downstream consumption.

Outcome

The core outcome was the successful transformation of an unscalable manual process into a high-performance, fully automated Generative AI pipeline, delivering immediate, quantifiable results:

  • Elimination of Scale Bottleneck: Throughput increased dramatically from a manual baseline of 30 products per hour to a sustained, automated peak rate of 4,500 products per hour (a 150x increase). This eliminated the critical constraint that prevented the customer from processing millions of products annually.
  • Maintenance of Data Quality: Despite the massive increase in processing speed, the Generative AI solution achieved a median categorization accuracy of 85%+, successfully maintaining the high standards of the former human experts.
  • Operational Stability: The shift to an AWS-native, serverless solution provides financial predictability and utilizes advanced AWS Batch and SQS controls, ensuring high resilience and stability in a multi-AZ production environment.