Skip to content

In development. Expect rough edges and changes. The source code is not public yet.

Zalando Engineering 9 min read Case study mediumAdept

Building a dynamic inventory optimisation system: A deep dive

Zalando's ZEOS builds replenishment recommendations by minimising a cost function that combines storage, lost sales, overstock, operations and inbound costs. Probabilistic demand forecasts feed a Monte Carlo simulation engine with gradient-free black-box optimisers. The weekly forecasting pipeline runs LightGBM through Nixtla's MLForecast with conformal inference, does pre-processing in PySpark on Databricks and feature transforms on SageMaker, and covers 5 million SKUs over about 3 years of history in under 2 hours. The optimisation service shares features via SageMaker Feature Store (online lookups at 10–20ms per SKU, S3-backed offline store). It serves daily batch transform jobs plus an interactive SQS/Lambda path for partner setting changes, keeping both paths consistent.

Assumes: time series forecasting basicsPySparkAWS SageMaker

Related posts

  • Paper Announcement: A Practical Approach to Replenishment Optimization with Extended (R, s, Q) Policy and Probabilistic Models

    Zalando Engineering hardMaster

    Zalando's ZEOS replenishment engine combines LightGBM quantile demand forecasts, an extended (R, s, Q) policy with a kick-start quantity and lifecycle cutoff, and Monte Carlo discrete event simulation over a 12-week horizon. It minimizes the 75th percentile of total cost (holding, logistics, returns, lost sales) rather than the mean. A one-year backtest on ~2M articles showed about 22% GMV uplift and 34% better availability versus human decisions, assuming full adoption. It also outperformed tuned (s, S), base-stock and newsvendor baselines. Ablations show probabilistic forecasts give the largest gain, and percentile optimization adds further stability.

  • Zalando's Machine Learning Platform

    Zalando Engineering mediumAdept

    Zalando's ML platform takes ideas from experimentation in a hosted JupyterHub (Datalab), Databricks and a GPU HPC cluster to production pipelines orchestrated by AWS Step Functions. Pipelines are written in zflow, an internal typed Python DSL that uses AWS CDK to generate CloudFormation templates, which are committed to git and deployed by Zalando's Continuous Delivery Platform. Pipeline stages call Databricks jobs and SageMaker training, batch transform and endpoints. Executions, metrics and model cards are tracked in a Backstage-based ML portal, and central teams supporting tooling and consulting complement ML expertise distributed across product teams.

  • Leveraging multimodal LLMs for Shopify’s global catalogue: Recap of expo talk at ICLR 2025

    Shopify Engineering mediumAdept

    Shopify's Global Catalogue uses fine-tuned open-source vision LLMs (LLaVA 1.5 7B, then LLaMA 3.2 11B, now Qwen2VL 7B) to classify, extract attributes from, standardize and match billions of merchant product listings. The system has four layers: streaming product data with change data capture, multi-task product understanding, graph-based product matching (LSH and embedding candidates, discriminator edge pruning, connected components) and canonical record reconciliation. Training each model to predict a randomly selected subset of fields kept it generalizable and cut median latency from 2s to 500ms and GPU usage by 40%. LLM-agent annotation with an LLM arbitrator, instruction-following eval metrics and active learning driven by low token probabilities support 40M inferences a day on Triton with FP8 quantization.

  • Shopify's Playbook for Scaling Machine Learning

    Shopify Engineering easyNovice

    Shopify's approach to scaling machine learning grew out of its first ML product, an order fraud detector that replaced a rule-based system with a high false-positive rate. Teams should pick a problem users care about, confirm the data is trustworthy and accessible, account for downstream dependencies such as fulfillment, and optimize for product outcomes rather than raw model scores. Shopify shipped a simple logistic regression model, built in Python, serialized to PMML, scheduled with Airflow and served in real time from Rails. To scale to hundreds of models, Shopify relies on input/output reconciliation, shadow backtesting, drift monitoring, platform-enforced best practices and automated model operations.

  • Automating Data Ingestion with a RAG Flywheel

    Zalando Engineering mediumAdept

    Zalando's Supply Operations automates mapping of diverse supplier spreadsheet headers (10-60 columns) onto a 55+ column internal schema using an LLM-driven RAG flywheel that learns from human-approved mappings. Generation runs on AWS Bedrock at temperature 0 with forced tool calling, and the API stays the decision boundary: it rejects unknown source or target columns and invalid confidence scores, and it enforces full coverage and stable ordering. Cold-start uploads rely on zero-shot deduction. Warm starts embed each column as name, type and sample values with Titan V2 (1024 dimensions), then query pgvector with an HNSW index for the top 3 matches above 0.8 cosine similarity, ranked by approval count to resist drift, and inject them as historical context.

The quest for software engineering knowledge.

Look:
Layout: