AWS for Industries

The Smart Stylist: How A Luxury Retailer Mastered Automated Product Style Attribution Using Generative AI

Introduction

The luxury e-commerce landscape demands meticulous attention to detail in product presentation. That expectation is likely to intensify as the sector continues to grow over the next decade. According to FortuneBusinessInsights.com, the global luxury goods market size is anticipated to grow to USD 392.40 billion by 2030.

Every pattern, from subtle pinstripes to elaborate jacquards, must be accurately classified to maintain the high standards expected by luxury consumers. This precision in classification directly impacts revenue generation through enhanced searchability, improved recommendation engines, and elevated customer satisfaction. According to this report, when consumers are able to filter products to find specific patterns or styles based on comprehensive, descriptive tags, revenue is boosted by as much as 211 percent.
In this blog post, we dive deep into how a luxury retailer was able to leverage the power of generative AI to automate the generation of product style, pattern, and elaborative product descriptions, using Amazon Bedrock to achieve results that would otherwise take multiple human hours.

The Challenge

Retailers frequently struggle to produce accurate descriptions, attributes, and tags for their products. Often, different manufacturers provide disparate product details that retailers must manually cleanse, normalize, and consolidate before onboarding those products to their website. In fact, the time required to manually reconcile inaccurate product details is the leading cause of production delays for fashion and apparel retailers.

Leading luxury retailers are now turning toward generative AI–powered intelligent multimodal product style and pattern classification, recognizing that their existing rule-based systems are fundamentally inadequate for the complexity of luxury fashion. These legacy systems, common across the luxury retail sector, operate on static rules that attempt to categorize products based on predetermined patterns and styles. While the rules are initially sensible, they fail to capture the nuanced variations in luxury fashion and the constant evolution of design trends. The inadequacies of these systems have a substantial impact on retailers. It is estimated that creating each new pattern or style rule consumes 20–25 hours, and while the accuracy of these systems typically starts at 85–90 percent, it dramatically deteriorates as new product designs and patterns are added. This leads to approximately 70–80 percent of products being miscategorized, resulting in 8–12 percent less discoverability in search and recommendations, and ultimately causing 5–7 percent revenue leakage. The scalability constraints are equally challenging. On average across the industry, each new category demands 40–50 hours of rule development, while seasonal collections, which occur four times a year, require 80–100 hours each, with system modifications taking 2–3 weeks to implement.

Furthermore, these traditional rule-based systems struggle with complex pattern recognition. For instance, when retailers attempt to categorize a high-end dress combining multiple patterns or featuring subtle texture variations, it consistently misclassifies, requiring time-consuming manual corrections. This limitation not only affects operational efficiency, but also impacts the customer experience, as products are often inappropriately categorized or missing from relevant search results.

The Solution

In this blog post, we discuss a sophisticated multimodal AI solution that transforms manual product classification into an efficient, automated process. This system leverages Amazon Bedrock and Anthropic Claude for advanced product analysis.

This solution follows a two-step process:

Step 1: It analyzes a product image utilizing Anthropic Claude Haiku model and generates a detailed product description, identifies the pattern focusing on visual aspects of the product, and provides reasoning behind pattern detection.

Step 2: It analyzes the product description and visual analysis generated by step 1 utilizing Anthropic Claude Haiku model and generates primary/secondary style categories, provides detailed reasoning for style classification, and provides key style elements identified.

Architecture

Figure 1 – ArchitectureFigure 1 – Architecture

  1. Extract product info (ID, name, description, image_path) into CSV and upload it to Amazon S3.
  2. S3 triggers ProcessProductDetails Lambda function via event notifications.
  3. ProcessProductDetails AWS Lambda function creates JSONL with product details and prompts for pattern analysis and uploads it to S3.
  4. ProcessProductDetails Lambda function triggers Amazon Bedrock batch inference job for pattern analysis utilizing Anthropic Claude Haiku model. This job generates a detailed product description focusing on visual aspect of the product, product pattern, and reasoning for pattern identification.
  5. Bedrock stores pattern analysis results to S3 as a JSONL file.
  6. Bedrock sends job completion status to Amazon EventBridge.
  7. EventBridge triggers PrepareData_StylePrediction Lambda function.
  8. The Lambda function combines pattern results with original product data, creates a new JSONL for style analysis, and uploads it to S3.
  9. PrepareData_StylePrediction triggers Amazon Bedrock batch inference job for style analysis utilizing Anthropic Claude Haiku model.
  10. Bedrock generates primary style category, secondary style categories (if applicable), detailed reasoning for the style classification, and key style elements identified and stores the results in S3, organized by style categories.
  11. This step is not included in the solution. Quality check is performed by human in the loop. QA is performed to check data quality, detect errors, and detect drift and performance degradation. As possible iteration and experimentation, you could update the prompt template and use different models.
  12. This step is not included in the solution. Approved assets are uploaded to DAM (Digital Asset Management) system.

Key features:

  • Multimodal pattern recognition for complex fashion items
  • Automated style attribute generation
  • AI-powered product description creation
  • High-throughput processing capability
  • Luxury retail-specific optimizations
  • Real-time e-commerce platform integration

Prerequisites

To deploy this solution, you must have the following:

  1. An AWS account.
  2. AWS Identity and Access Management (IAM) permissions to run an AWS CloudFormation template.
  3. Access to Amazon Bedrock Anthropic Claude Haiku model. For more details, refer to the documentation.

Cost estimate for processing 10,000 products with 1MB image each:Cost estimate chart totaling $26.03
We utilize AWS serverless services for this solution. The cost for the compute would be pay per use. We use Amazon Bedrock Batch Inference feature, which is 50 percent cheaper than the on-demand cost. The cost of Bedrock would depend on the model selected. Please check Bedrock pricing here.

Solution Implementation

This solution deploys services enclosed in the box in the architecture diagram.

Security best practices are implemented with AWS Identity and Access Management (IAM), employing the principle of least privilege. Each component, particularly the Lambda functions, operates with permissions scoped to only those required for their specific tasks. This granular access control minimizes the potential attack surface area.

All information logs and errors are logged in Amazon CloudWatch.

Launch stack button

1. Launch the CloudFormation Stack.

Figure 2 – Create stack using CloudFormationFigure 2 – Create stack using CloudFormation

2. On the Create stack page, choose Next.
3. On the Specify stack details page, click Next

Figure 3 – Stack detailsFigure 3 – Stack details

4. On the Configure stack options page, keep default selections and acknowledge that AWS CloudFormation might create IAM resources. For more information about IAM, see Resources to learn more about IAM, and click Next.

Figure 4 – IAM resources acknowledgmentFigure 4 – IAM resources acknowledgment

5. On the Review page, Submit.
6. Once the stack is completely deployed, stack status will change to CREATE_COMPLETE. You can check the Resources tab for the resources created by the CloudFormation stack.

Figure 5 – Stack status

Figure 5 – Stack status

Figure 6 – Provisioned resources

Figure 6 – Provisioned resources

7. Download images.zip. This zip contains product images that we will use for this solution.
8. Download Products.csv. This file contains product metadata.
9. Extract images.zip file and remember folder path.
10 Navigate to Amazon S3 console. Click on bucket ending with style-classifier-artifacts. Click Upload.
11. On the Upload screen, click Add Folder and select the images folder that you extracted in step 8.
12. Click Upload. It may take a few minutes to upload all the images to the folder.

Figure 7 – Upload product images

Figure 7 – Upload product images

13. Navigate back to the S3 bucket and upload products.csv. Make sure the images folder is uploaded before uploading products.csv file as it contains image paths.

Solution Testing

When the product.csv file is uploaded to the S3 bucket, the flow depicted in the architecture diagram executes.

1. Navigate to Amazon Bedrock console. In the left-hand navigation, click Batch Inference.
2. Notice the job name beginning with product-analysis.

a. As the job progresses, the status changes from Submitted→Validating→Scheduled→In progress→Completed. It may take a few minutes for the job to complete.

Figure 8 – Batch inference job status

Figure 8 – Batch inference job status

3. As soon as the product-analysis job completes, the 2nd Bedrock batch inference job, style-analysis, begins.

Figure 9 – Batch inference job status – 2nd job

Figure 9 – Batch inference job status – 2nd job

4. style-analysis job goes thru the same cycle and completes in a few minutes.

Data Validation

Navigate to Lambda console. Open styleclassifier-ProcessProductDetails function. Take a look at the prompt. For each product image, we ask Amazon Bedrock to generate a detailed description focusing on visual aspects, identify the pattern, and provide reasoning for the pattern identification. This Lambda triggers Bedrock batch inference job product-analysis.

Figure 10 – Pattern recognition and product description prompt

Figure 10 – Pattern recognition and product description prompt

2. The product-analysis job stores the output in JSONL format in s3://<accountId>-style-classifier-artifacts/batch-inference/output/<BedrockJobId>/

Figure 11 – Batch inference job output 1

Figure 11 – Batch inference job output 1

3. Observe the output generated by Bedrock – Detailed Description, Pattern Identification and reasoning.

Figure 12 – Batch inference job 1 output details

Figure 12 – Batch inference job 1 output details

4. Navigate back to Lambda console. Open styleclassifier-PrepareDataForStyle function. Take a look at the prompt. For each product description generated by product-analysis, we ask Amazon Bedrock to generate primary product style, secondary styles, reasoning, and key style elements in a JSON format. This Lambda triggers Bedrock batch inference job style-analysis.

Figure 13 – Style classification prompt

Figure 13 – Style classification prompt

5. The style-analysis job stores the output in JSONL format in s3://<accountId>-style-classifier-artifacts/batch-inference/style-analysis/output/<BedrockJobId>/

Figure 14 – Batch inference job output 2

Figure 14 – Batch inference job output 2

6. Observe the output generated by Bedrock – Primary/Secondary styles, reasoning, and key elements.

Figure 15 – Batch inference job 2 output details

Figure 15 – Batch inference job 2 output details

For further details about this solution and synthetic dataset generation, please see our github repository.

Clean Up

To avoid incurring future charges, follow these steps to remove the resources:

1. Empty the S3 bucket.

  • Navigate to the Amazon S3 console.
  • Select <AccountId>-style-classifier-artifacts bucket.

Figure 16 – Select S3 bucket Figure 16 – Select S3 bucket

2. On the Empty bucket page, enter permanently delete in the confirm deletion field and click Empty.

3. Delete the solution.

  • Go to the CloudFormation console and select the styleclassifier stack you created as part of this project. Click on the stack and click Delete.

Figure 17 – Delete CloudFormation stack

Figure 17 – Delete CloudFormation stack

Conclusion

With the global luxury e-commerce market experiencing unprecedented growth, the stakes for accurate product classification have never been higher. By utilizing Amazon Bedrock, luxury retailers can not only improve operational efficiency but also enhance the customer experience through more accurate and consistent product categorization. This approach can help classify disparate products and generate more accurate product attribute tags, which can help onboard products faster—reducing product listing time by 60–70 percent and cutting operational costs by 40–45 percent. From the consumer point of view, these tags can improve searchability, SEO (search engine optimization), and customer experience, resulting in a 25–30 percent improvement in search relevancy scores and a 1–5 percent increase in order conversion rates. While this blog shows this solution/example code applied to luxury apparel retail products, it can be applied across different types of industries and products. Please experiment with the solution and try it out today!

Pritam Bedse

Pritam Bedse

Pritam Bedse is a Senior Solutions Architect at Amazon Web Services, helping Enterprise customers. His interests and experience include AI/ML, Analytics, Serverless Technology, and customer engagement platforms. Outside of work, you can find Pritam outdoors gardening and grilling.

Neelam Koshiya

Neelam Koshiya

Neelam Koshiya is principal Applied AI Architect(GenAI specialist) at AWS. With a background in software engineering, she moved organically into an architecture role. Her current focus is to help enterprise customers with their ML/ genAI journeys for strategic business outcomes. She likes to build content/mechanisms to scale to larger audience. She is passionate about innovation and inclusion. In her spare time, she enjoys reading and being outdoors.