TimeRAG: Boosting LLM Time Series Forecasting via Retrieval-Augmented Generation
Authors:
- 6 April 2025
- conference paper
- Published by Institute of Electrical and Electronics Engineers (IEEE)
- p. 1-5
Abstract
Although the rise of large language models (LLMs) has introduced new opportunities for time series forecasting, existing LLM-based solutions require excessive training and exhibit limited transferability. In view of these challenges, we propose TimeRAG, a framework that incorporates Retrieval-Augmented Generation (RAG) into time series forecasting LLMs, which constructs a time series knowledge base from historical sequences, retrieves reference sequences from the knowledge base that exhibit similar patterns to the query sequence measured by Dynamic Time Warping (DTW), and combines these reference sequences and the prediction query as a textual prompt to the time series forecasting LLM. Experiments on datasets from various domains show that the integration of RAG improved the prediction accuracy of the original model by 2.97% on average.Keywords
All Related Versions
This publication has 16 references indexed in Scilit:
- Lost in the Middle: How Language Models Use Long ContextsTransactions of the Association for Computational Linguistics, 2024
- PromptCast: A New Prompt-Based Learning Paradigm for Time Series ForecastingIEEE Transactions on Knowledge and Data Engineering, 2023
- TSMixer: Lightweight MLP-Mixer Model for Multivariate Time Series Forecasting2023
- LightTS: Lightweight Time Series Classification with Adaptive Ensemble DistillationProceedings of the ACM on Management of Data, 2023
- AutoFormer: Searching Transformers for Visual Recognition2021
- Time-series forecasting with deep learning: a surveyPhilosophical Transactions of the Royal Society A: Mathematical, Physical and Engineering Sciences, 2021
- The M4 Competition: 100,000 time series and 61 forecasting methodsInternational Journal of Forecasting, 2020
- Time series forecasting of petroleum production using deep LSTM recurrent networksNeurocomputing, 2019
- Dynamic Time Warping2007
- Dynamic programming algorithm optimization for spoken word recognitionIEEE Transactions on Acoustics, Speech, and Signal Processing, 1978