DatabricksSunny SinghExplainer
Real-Time Retail Intelligence: Building E-Commerce Recommendations with Lakebase and AI Search on Databricks
Summary
The post presents a reference architecture for building a production-grade e-commerce recommendation system on Databricks, based on a real-world implementation for a leading fashion e-commerce platform in Asia serving over 1 million monthly active users across 100,000+ SKUs. The system ingests approximately 1,000 events per second via Lakeflow Connect’s Zerobus into Unity Catalog Delta tables within a medallion architecture. Serving uses two paths: Path A for pre-computed batch recommendations via key-value lookup from Lakebase online tables, and Path B for real-time session-aware scoring using AI Search and a LightGBM model in a 3-stage funnel. The architecture unifies ingestion, feature management, model training, vector retrieval, and serving on a single governed platform, with cold-start handling for new users and products. Expected outcomes include low 2-digit millisecond responses, daily-fresh recommendations, and unified governance via Unity Catalog.
Context
Building a production-grade e-commerce recommendation system requires real-time data ingestion, complex feature engineering, multiple ML models, and low-latency serving, while keeping inventory and business rules in sync. This architecture addresses those challenges on a unified Databricks platform.
Approach / What changed
The architecture uses Lakeflow Connect’s Zerobus for real-time ingestion into Unity Catalog Delta tables, a medallion architecture for data processing, Feature Store and Lakebase for feature management, AI Search for hybrid retrieval, LightGBM for scoring, and Model Serving for low-latency inference, with two serving paths: pre-computed batch and real-time session-aware.
Takeaways
The system uses two serving paths: Path A for pre-computed batch recommendations via key-value lookup from Lakebase online tables, and Path B for real-time session-aware scoring using AI Search and LightGBM in a 3-stage funnel.
The architecture unifies ingestion, feature engineering, model training, vector retrieval, and serving on a single Databricks platform governed by Unity Catalog, eliminating the need for multiple specialized systems.
Cold-start for new users is handled by generating an embedding from demographic and sign-up data, while new products inherit scores from similar existing items via attribute-based embeddings.
FAQ
How does the system handle real-time session signals during inference?
In-session user signals are sent directly as part of the API request payload to the Model Serving endpoint, bypassing lakehouse storage to avoid ingestion latency.
What is the difference between Path A and Path B serving?
Path A serves pre-computed batch recommendations via key-value lookup from Lakebase online tables, while Path B performs real-time session-aware scoring using AI Search and a LightGBM model in a 3-stage funnel.
How are new users and new products handled?
New users get an embedding from demographic and sign-up data for ANN search, while new products inherit scores from similar existing items via attribute-based embeddings.
Source and freshness
- Source
- databricks.com
- Published
- Added to Yomu
Summaries are generated from the original by a language model. Check the original before relying on it.
Keep reading
Related reading
The Good Stuff
Paid picks we use ourselves. Links carry a referral code — a subscription through one earns us a commission at no extra cost to you.
The best engineering reads, once a week
One useful email. Unsubscribe anytime.