This repository contains the code for this (blog post)[https://medium.com/@benedikt_heidrich/can-we-do-time-series-analysis-with-llm-powered-workflows-using-sktime-12b19cf39376].
To run the code you need:
- to add an Mistral API key to a
.env
file in the root of the repository like this:
MISTRAL_API_KEY = <your_api_key>
- to install the dependencies using uv.
Then you can run the notebooks:
workflow_with_sktime.ipynb
, which contains three runs of the workflow:- Forecasting of load airline data
- Forecasting of electricity demand of New South Wales
- Anomaly detection on a very simple synthetic time series.
consistency_analysis.ipynb
, contains simple code to analyse how consistent the LLM is in selecting estimator.
The agentic workflow is implemented in src/workflow/agent.py
.