Inspiration
Retail businesses often struggle with demand fluctuations, overstocking, and understocking, leading to significant revenue loss. Inspired by this real-world challenge, I set out to build a modern, scalable, and AI-powered forecasting solution that bridges the gap between data engineering and cutting-edge machine learning.
What It Does
This project delivers an end-to-end forecasting pipeline for retail supply chains, leveraging both traditional ML and GenAI. It processes raw transactional and store-level data, transforms it into model-ready features, and generates weekly sales forecasts using both XGBoost and TimeLLM (a GPT2-based time series model). The results are visualized in an accessible Streamlit dashboard with explainability and voice interaction.
How I Built It
The solution follows a modular data engineering architecture powered by AWS:
- Data Lake: Raw CSVs stored in Amazon S3, cataloged with AWS Glue Crawlers
- ETL Pipeline: Built in AWS Glue Studio to clean, join, and transform data into Parquet format
- Feature Store: Partitioned datasets used to create model-ready inputs using Athena
- Modeling:
- Trained XGBoost models grouped by
store_type - Integrated TimeLLM model in GPT2 mode for GenAI-based time series forecasting
- Trained XGBoost models grouped by
- Inference Layer: Batched and real-time predictions via FastAPI + Lambda
- Visualization: Forecasts, comparisons, and explainability surfaced via Streamlit with voice support
- Feedback & Security: Prediction logging in RDS, with IAM, CloudWatch, and Macie for monitoring and compliance
Challenges
- Integrating a custom GenAI time series model (TimeLLM) within AWS SageMaker
- Handling large-scale joins and partitioning in Glue for performance
- Balancing interpretability with accuracy across ML and GenAI approaches
- Ensuring real-time responsiveness and accessibility in the frontend
What I Learned
- Advanced data pipeline design using AWS services
- Deploying and integrating LLMs for time series use cases
- Building secure, explainable, and production-grade ML systems
- Comparing traditional ML with GenAI to evaluate trade-offs in accuracy, transparency, and complexity
What's Next
- Fine-tune the TimeLLM model on retail-specific sequences
- Add real-time alerting and budget planning features
- Open source the architecture for educational and enterprise use
Built With
- amazon-rds-relational-database-service
- amazon-web-services
- aws-athena
- aws-glue
- aws-lambda
- cloudwatch
- fastapi
- iam
- macie
- pandas
- parquet
- pyarrow
- python
- sagemaker
- streamlit
- timellm-(gpt2-based)
- xgboost

Log in or sign up for Devpost to join the conversation.