RAG Example: E-commerce Product Assistant
ScaleDown Team • February 2025 • 10 min read Online shoppers ask specific questions: “Is this jacket waterproof?”, “Does this laptop have a USB-C port?”, “Which running shoes work for flat feet?” A product assistant powered by RAG can answer these from your catalog data, and you don’t need a vector database to build one. With ScaleDown, you feed your product catalog ascontext and the shopper’s question as prompt. ScaleDown compresses the catalog down to only the relevant product details before the LLM generates an answer.
The Problem
Product catalogs have hundreds of items, each with specs, descriptions, pricing, and availability. When a shopper asks about one product or feature, the LLM doesn’t need to see every item in the catalog. Just the ones that match.The Product Catalog
Here’s a sample electronics catalog with 6 products:Sample product catalog
Sample product catalog
Build the Product Assistant
Compress the catalog against the question
A shopper asks about USB-C ports. The catalog has 6 products. ScaleDown keeps only the ones with relevant port information.
What got compressed?
What got compressed?
The catalog has 6 products. The shopper asked about laptops with USB-C. ScaleDown kept the MacBook Pro (3x Thunderbolt 4 USB-C) and Dell XPS 13 (2x Thunderbolt 4 USB-C) details while compressing away the headphones, phone, earbuds, and TV since none of those are laptops.
Generate the answer
We have two laptops with USB-C ports:
- MacBook Pro 16” M3 Max ($3,499) - 3x Thunderbolt 4 (USB-C) ports, plus HDMI, SDXC, and MagSafe
- Dell XPS 13 Plus ($1,299) - 2x Thunderbolt 4 (USB-C) ports (note: no USB-A or headphone jack)
Specific port counts, accurate prices, and a useful note about the Dell’s limited port selection. All grounded in the catalog data.
Reusable Product Q&A Function
- Python
Why This Works for E-commerce
Catalog-wide search
Shoppers ask cross-product questions like “What’s your cheapest noise-canceling option?” ScaleDown surfaces the right products from the entire catalog.
Spec accuracy
Product specs need to be exact. Wrong prices or features break trust. Compression preserves numbers, specs, and prices while removing unrelated products.