retailtechai-mvp

How SpeedMVPs Built an AI Product Personalisation MVP for E-commerce: RetailTech AI-MVP Case Study

E-commerce conversion rates average around 2-3%, which means roughly 97 out of every 100 visitors leave without buying. A significant portion of that gap is relevance: visitors see products that do not match their interests, price expectations, or purchase context. AI-powered product personalisation that surfaces the right products to the right shopper at the right moment can lift conversion rates, average order value, and return visitor rates meaningfully. SpeedMVPs built an AI product personalisation MVP for an e-commerce client using Next.js, PostgreSQL, OpenAI Embeddings, Pinecone, and Vercel. The system generates semantic product embeddings, tracks real-time user behaviour signals, computes personalised product rankings for each visitor, and delivers personalised recommendation widgets across the shopping experience. Delivered in under three weeks at a fixed price from GBP 8,000, with full code ownership transferred and GDPR-compliant preference storage by design. UK e-commerce founders building personalisation products must distinguish between session-level personalisation, which requires no cookie consent under UK PECR, and cross-session preference storage, which requires explicit consent via a compliant cookie banner. Getting this distinction right from the start avoids the need to rebuild the consent and data architecture after an ICO enforcement action or a cookie audit by a major retail client. SpeedMVPs has delivered embedding-based personalisation MVPs for UK fashion and retail e-commerce clients where the consent mode architecture, PECR compliance, and GDPR data minimisation are designed into the product from day one rather than retrofitted after the first compliance review.

Tech Stack

Next.jsPostgreSQLOpenAI EmbeddingsPineconeVercel

Project Overview and Business Context

The client was a UK fashion e-commerce retailer with approximately 8,000 active product listings across multiple categories. Their existing product recommendations were rule-based: bestsellers, new arrivals, and manually curated collections. These were not personalised to individual shoppers and performed roughly the same for all users regardless of their demonstrated preferences. The brief was to build a personalisation system that adapts product recommendations to each shopper's observed behaviour in the current session and across past sessions, surfacing relevant products from the full catalogue rather than a manually curated subset. The technical challenge in personalisation is matching shopper intent signals, which are sparse and noisy, to a large product catalogue in real time without introducing latency that harms the shopping experience. Semantic embeddings address the catalogue side: representing each product as a dense vector that captures its meaning beyond keyword overlap. Behaviour signal processing addresses the intent side: converting clicks, views, add-to-basket events, and purchase history into a real-time preference signal. GDPR compliance is a material consideration for e-commerce personalisation. Storing individual browsing behaviour and using it to personalise content requires a lawful basis. The client's approach uses legitimate interests for session-level personalisation (no consent required for temporary session signals) and explicit consent (cookie banner) for cross-session preference storage. Data minimisation principles mean that only behavioural signals necessary for personalisation are stored, and raw event data is aggregated and retained for only 90 days.

Technical Architecture and Stack Decisions

The architecture has three main layers: product indexing, behaviour signal processing, and real-time ranking. The product indexing layer runs as a weekly batch job on Vercel serverless functions. For each active product, it concatenates the product title, description, category tags, and material attributes into a structured text string and passes it to the OpenAI text-embedding-3-small model to generate a 1536-dimensional embedding vector. Vectors are stored in Pinecone with product metadata (price, category, stock status, image URL, product URL). In-stock products with updated attributes are re-embedded weekly; embeddings are stable for unchanged products. The behaviour signal layer processes three event types: product views (weighted 1), add-to-basket events (weighted 3), and purchase events (weighted 5). These events are collected client-side via a JavaScript snippet and posted to a Next.js API route that aggregates them into a session preference vector. The preference vector is an average of the embedding vectors of recently interacted products, weighted by event type and recency. This gives a single dense vector representing the shopper's current session intent. The real-time ranking layer queries Pinecone with the session preference vector to retrieve the top 20 most similar products by cosine similarity, filtered to in-stock products and excluding already-purchased or already-viewed items. Results are re-ranked by a diversity algorithm that ensures the top 10 recommendations span at least 3 different sub-categories. The personalised recommendation set is delivered to the frontend as a JSON response in under 80ms for 95% of requests.

Key AI and ML Components

OpenAI text-embedding-3-small is the core AI component. Product embeddings capture semantic relationships between products that keyword-based systems miss: a shopper who views a linen blazer sees recommendations for linen trousers and tailored shorts, not just other blazers, because the embedding space groups linen tailoring products by material and style context rather than product category alone. This cross-category relevance is the primary value of embedding-based personalisation versus category-filtered recommendations. The preference vector aggregation is the second key component. Averaging embedding vectors of interacted products to produce a session-level preference representation is a well-established technique that requires no model training and updates in real time as the shopper browses. The recency weighting (more recent interactions weighted higher) ensures the preference vector reflects the shopper's current intent even if it differs from their historical purchase pattern. A shopper who typically buys casual clothing but is currently browsing formal wear for an event will see formal recommendations within a few product views. The diversity re-ranking algorithm is deterministic, not AI-driven. Ensuring recommendation diversity prevents the personalisation engine from showing ten near-identical products to a shopper whose recent interactions are all within one narrow sub-category, which would reduce the recommendation set's utility.

Challenges Solved and How

Cold start for new visitors with no session history is handled by reverting to popularity-based recommendations (bestsellers weighted by category) for the first three product views, then transitioning to embedding-based personalisation once a preference signal has accumulated. The three-view threshold was calibrated from A/B testing data: below three interactions, the preference vector is too noisy to outperform popularity-based defaults. GDPR consent management for cross-session personalisation required a clear cookie consent flow. Session-level personalisation uses only in-session memory and requires no consent. Cross-session personalisation (remembering preferences from a previous visit) stores a pseudonymous visitor ID and a compact preference profile in a first-party cookie, requiring explicit consent under UK PECR. The consent banner is integrated with the personalisation system: when a visitor declines cookie consent, the system falls back to session-only personalisation. Embedding freshness for a fast-moving fashion catalogue was addressed by the weekly re-embedding run and an on-demand re-embedding trigger for new product additions, ensuring that new arrivals enter the recommendation pool within hours of going live rather than waiting for the next weekly batch.

Outcome and Measurable Results

The client ran an A/B test for eight weeks with 50% of traffic receiving personalised recommendations and 50% receiving the previous rule-based recommendations. Click-through rate on recommendation widgets increased by 34% in the personalised variant. Conversion rate from recommendation click to purchase was 4.1% for personalised recommendations versus 2.8% for rule-based, a 46% improvement. Average order value for sessions that included a recommendation click was 12% higher in the personalised variant, attributed to the cross-category recommendations surfacing complementary items the shopper would not have found through navigation alone. Return visitor rate over a 30-day window increased by 8% in the personalised variant, suggesting that relevant recommendations improved overall shopping satisfaction beyond the immediate session.

Lessons for Similar Projects

Embeddings over keywords for catalogue-rich personalisation. A keyword-based recommendation system will show a shopper who bought a red dress more red dresses. An embedding-based system shows them complementary items across categories that share aesthetic and contextual relevance. The semantic understanding is what makes personalisation feel intelligent rather than mechanical. Start with session-level personalisation before adding cross-session complexity. Session-level personalisation is effective, GDPR-simple, and requires no consent infrastructure. Validate the lift with an A/B test before investing in the cross-session storage and consent layer. Diversity algorithms matter as much as relevance algorithms. A personalisation engine that shows ten identical products loses the shopper's attention on the second scan. Build diversity constraints into the ranking layer from the start. Make re-embedding fast and cheap. A fashion catalogue changes rapidly. A weekly batch re-embedding is a minimum; an on-demand trigger for new product additions is essential.

Frequently Asked Questions

How does the personalisation system handle new visitors with no browsing history?+

New visitors with no session history receive popularity-based recommendations (bestsellers in the most relevant category) until they have interacted with at least three products. At that point, the system has enough signal to compute a meaningful preference vector and begins delivering personalised recommendations. The transition from popularity-based to personalised recommendations is seamless from the shopper's perspective.

Does the personalisation engine require cookie consent under UK GDPR?+

Session-level personalisation, which uses only in-session behaviour signals stored in browser memory and cleared when the session ends, does not require consent under UK PECR. Cross-session personalisation, which stores a preference profile in a first-party cookie to personalise recommendations on return visits, requires explicit consent. The MVP implements both modes, defaulting to session-only personalisation for visitors who have not consented to cookies.

How quickly does the personalisation engine update as a shopper browses?+

The preference vector updates after every product interaction (view, add-to-basket, purchase). Recommendation widgets refresh within 200ms of a new interaction being processed. For a shopper who starts browsing in one category and shifts to another, the recommendations update within 2-3 interactions to reflect the new intent signal. Recency weighting ensures recent interactions outweigh older ones in the preference calculation.

Can the system personalise search results as well as recommendation widgets?+

Yes. The same preference vector used for recommendation widgets can be used to re-rank search results, surfacing items from the search result set that are most relevant to the shopper's demonstrated preferences. Search result personalisation is an extension to the MVP that requires integration with the search engine. If the client uses Algolia or Elasticsearch, SpeedMVPs can build the preference-based re-ranking as a second phase.

What e-commerce platforms does the personalisation MVP support?+

The MVP is platform-agnostic: it ingests product data via CSV or API from any e-commerce platform and tracks behaviour via a JavaScript snippet added to the storefront. Specific integrations with Shopify, WooCommerce, and Magento are available as configured extensions. SpeedMVPs builds the integration layer as part of the project, adapting the product data ingestion to the client's specific platform export format.

Building something similar? Get a free consultation at speedmvps.co.uk

Get a Free Quote