TimeRAG: BOOSTING LLM Time Series Forecasting via Retrieval-Augmented Generation
Silin Yang, Dong Wang, Haoqi Zheng, Ruochun Jin

TL;DR
TimeRAG enhances large language model-based time series forecasting by retrieving similar historical sequences using Dynamic Time Warping and incorporating them into prompts, leading to improved prediction accuracy across diverse datasets.
Contribution
The paper introduces TimeRAG, a novel retrieval-augmented framework that leverages a knowledge base of historical sequences to boost LLM forecasting performance.
Findings
Average prediction accuracy improved by 2.97%.
Effective retrieval of similar sequences enhances forecasting.
Applicable across multiple domain datasets.
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.
Peer Reviews
No public reviews on file for this paper yet. If you reviewed it on a platform where reviews are public (OpenReview, ICLR, NeurIPS, ICML), you can paste yours below so the community can read it here.
Videos
No videos yet. Explain this paper in a talk, walkthrough, or lecture? Add one.
Taxonomy
TopicsTime Series Analysis and Forecasting · Stock Market Forecasting Methods · Advanced Text Analysis Techniques
MethodsAttention Is All You Need · Linear Layer · Residual Connection · Adam · Weight Decay · Multi-Head Attention · Layer Normalization · WordPiece · Dropout · Softmax
