
Modulai worked together with Ahlsell's Applied AI team to develop a real-time session-based recommender system. The system weighs a customer's intent during a given session on Ahlsell's website or app to provide contextually relevant recommendations, balancing predictive performance against operational cost and latency.
Outcome
5-10
MSEK additional monthly revenue
Challenge
Many of Ahlsell's customers do project-based work, so the products relevant to them can vary greatly from day to day. The same customer may look for completely different product categories between sessions because they are ordering for different projects. Capturing that meant making recommendations from in-session behavior in real time, rather than from past purchases alone.
Solution
Several models of varying architecture and complexity were evaluated using metrics reflecting both predictive performance and operational cost. The models generate vector representations (embeddings) that encode the user's current session, which are then used to score products by how likely they are to be of interest. Balancing model complexity against performance was the key challenge. Higher accuracy means better recommendations and more revenue, but more complex models cost more to run and load more slowly.
Tools
The models were created with PyTorch and designed to be fully compatible with TorchScript for performance and portability. An Azure Machine Learning pipeline handles data ingestion, processing, and scheduled model training. The model is deployed as an Azure Machine Learning endpoint with auto-scaling, and an API within Ahlsell's existing API management service minimizes front-end integration work.
Value created
The recommender runs in real time on Ahlsell's website and app, scoring products against what a customer is doing in the current session rather than relying on past purchases. For customers whose needs shift project to project, that means recommendations that reflect what they are working on right now. The system was built to hold predictive performance and running cost in balance, so the recommendations stay relevant without driving up inference cost or slowing the site.
Learn more



