← back to case filesCASE FILE · 05 / 09
GenAI Retail Forecast product screenshot
product snapshot ↗
RETAIL · GENAI · DEMAND FORECASTING

GenAI Retail Forecast

Demand forecasting and retail intelligence platform for Rossmann with real-time dashboards, GenAI narratives, and automated alerts.

Stack

DATA ENGINEERING
PythonApache BeamPySparkGoogle Cloud Storage
ANALYTICS / ML
BigQuery ML (ARIMA_PLUS)80% Prediction Interval
GENAI / NLP
LangChainFAISSVertex AI (Gemini)
BACKEND
FastAPIPostgreSQLUvicornAsyncIO
FRONTEND
Next.jsReactTypeScriptRecharts
DEPLOYMENT
DockerGoogle Cloud RunGCSDataflow

The Problem

Retail demand is volatile and hard to predict. Inaccurate forecasts lead to stockouts, overstocking, and lost sales across 1000+ stores.

What I Built

An end-to-end platform that forecasts demand for 1,115 Rossmann stores using ARIMA_PLUS, delivers GenAI-powered insights, and monitors performance with real-time dashboards.

The Difference

Combines BigQuery ML forecasting, real-time pipelines, and GenAI narratives with business context retrieved for faster, data-driven retail decisions at scale.

Numbers That Matter

1,115real Rossmann stores
30days forecast horizon
33,450holdout rows (for backtest)
16.92%best local MAPE achieved
80%forecast confidence interval

Engineering Notes ✎

01

Real-time Data Pipeline

Apache Beam pipelines process events from multiple sources and write cleaned data to BigQuery for downstream analytics.

02

Forecasting Engine

BigQuery ML ARIMA_PLUS models are trained per store with 80% prediction intervals for accurate 30-day demand forecasts.

03

GenAI Insights

LangChain + FAISS provide relevant business context to the LLM, generating grounded, actionable narratives for stakeholders.

Architecture Overview

Data Sources• Store Sales• Orders• Inventory• Promotions• Holidays• WeatherApache Beam(ETL Pipeline)PySpark(Feature Engineering)BigQuery ML(ARIMA_PLUS)PostgreSQL(Results Store)Next.js Dashboard(Analytics &Visualizations)FastAPI(Backend API)One Modelper StoreBusiness Context• Category Info• Store Metadata• Promotions• Historical InsightsFAISS(Vector Store)LangChain(RAG Orchestrator)Vertex AI(Gemini LLM)GenAI Narrative(Executive Insights)Real-time data flow & GenAI insights