This repository contains the code for the paper: "Large Language Models can Deliver Accurate and Interpretable Time Series Anomaly Detection". It demonstrates the use of Large Language Models (LLMs) to tackle the task of Time Series Anomaly Detection.
To get started, clone the repository and install the necessary dependencies:
cd LLM_AD
pip install -U openai fastdtw pandas numpy scipyBefore running the scripts, set up your configuration file config.yaml with your OpenAI API details:
openai:
api_key: "your-api-key"
base_url: "https://api.openai.com/v1"Below are the commands to run the scripts for different datasets.
bash script/yahoo.shbash script/wsd.shbash script/kpi.sh| File Name | Description |
|---|---|
run.py |
Program entry point |
Prompt_template.py |
Structure of the prompt |
Eval/* |
Scripts to compute evaluation metrics |
If you find this repo helpful, please cite the following papers:
@article{liu2024large,
title={Large Language Models can Deliver Accurate and Interpretable Time Series Anomaly Detection},
author={Liu, Jun and Zhang, Chaoyun and Qian, Jiaxu and Ma, Minghua and Qin, Si and Bansal, Chetan and Lin, Qingwei and Rajmohan, Saravan and Zhang, Dongmei},
journal={arXiv preprint arXiv:2405.15370},
year={2024}
}
