# TimeRAG: BOOSTING LLM Time Series Forecasting via Retrieval-Augmented Generation

arXiv: https://arxiv.org/abs/2412.16643 · HTML: https://mlsanity.com/paper/2412.16643/

## Key facts

- Cited by 21 papers in the map (data through 14 Oct 2026).
- Placed in Time series and agricultural RAG, one of 15 directions in Retrieval-augmented generation.
- Builds on 21 of its 30 references that are in the map.
- First posted on arXiv 21 Dec 2024.

## Placed in

- Retrieval-augmented generation / [Time series and agricultural RAG](https://mlsanity.com/rag/time-series-and-agricultural-rag/)

## Builds on (most cited first, 21 of 21)

- [Retrieval-Augmented Generation for Knowledge-Intensive NLP Tasks](https://mlsanity.com/paper/2005.11401/) (2020)
- [Lost in the Middle: How Language Models Use Long Contexts](https://mlsanity.com/paper/2307.03172/) (2023)
- [Informer: Beyond Efficient Transformer for Long Sequence Time-Series Forecasting](https://mlsanity.com/paper/2012.07436/) (2020)
- [Reformer: The Efficient Transformer](https://mlsanity.com/paper/2001.04451/) (2020)
- [Are Transformers Effective for Time Series Forecasting?](https://mlsanity.com/paper/2205.13504/) (2022)
- [FEDformer: Frequency Enhanced Decomposed Transformer for Long-term Series Forecasting](https://mlsanity.com/paper/2201.12740/) (2022)
- [iTransformer: Inverted Transformers Are Effective for Time Series Forecasting](https://mlsanity.com/paper/2310.06625/) (2023)
- [A Multitask, Multilingual, Multimodal Evaluation of ChatGPT on Reasoning, Hallucination, and Interactivity](https://mlsanity.com/paper/2302.04023/) (2023)
- [Chronos: Learning the Language of Time Series](https://mlsanity.com/paper/2403.07815/) (2024)
- [N-BEATS: Neural basis expansion analysis for interpretable time series forecasting](https://mlsanity.com/paper/1905.10437/) (2019)
- [Time-LLM: Time Series Forecasting by Reprogramming Large Language Models](https://mlsanity.com/paper/2310.01728/) (2023)
- [One Fits All:Power General Time Series Analysis by Pretrained LM](https://mlsanity.com/paper/2302.11939/) (2023)
- [Time Series Forecasting With Deep Learning: A Survey](https://mlsanity.com/paper/2004.13408/) (2020)
- [AutoFormer: Searching Transformers for Visual Recognition](https://mlsanity.com/paper/2107.00651/) (2021)
- [PromptCast: A New Prompt-based Learning Paradigm for Time Series Forecasting](https://mlsanity.com/paper/2210.08964/) (2022)
- [FiLM: Frequency improved Legendre Memory Model for Long-term Time Series Forecasting](https://mlsanity.com/paper/2205.08897/) (2022)
- [TSMixer: Lightweight MLP-Mixer Model for Multivariate Time Series Forecasting](https://mlsanity.com/paper/2306.09364/) (2023)
- [Empowering Time Series Analysis with Large Language Models: A Survey](https://mlsanity.com/paper/2402.03182/) (2024)
- [LSTPrompt: Large Language Models as Zero-Shot Time Series Forecasters by Long-Short-Term Prompting](https://mlsanity.com/paper/2402.16132/) (2024)
- [LightTS: Lightweight Time Series Classification with Adaptive Ensemble Distillation -- Extended Version](https://mlsanity.com/paper/2302.12721/) (2023)
- [Uni-Parser: Unified Semantic Parser for Question Answering on Knowledge Base and Database](https://mlsanity.com/paper/2211.05165/) (2022)

## Built on by (most cited first, 21 of 21)

- [TS-RAG: Retrieval-Augmented Generation based Time Series Foundation Models are Stronger Zero-Shot Forecaster](https://mlsanity.com/paper/2503.07649/) (2025)
- [Time-IMM: A Dataset and Benchmark for Irregular Multimodal Multivariate Time Series](https://mlsanity.com/paper/2506.10412/) (2025)
- [Graph-based Approaches and Functionalities in Retrieval-Augmented Generation: A Comprehensive Survey](https://mlsanity.com/paper/2504.10499/) (2025)
- [LLM/Agent-as-Data-Analyst: A Survey](https://mlsanity.com/paper/2509.23988/) (2025)
- [Retrieval-augmented Large Language Models for Financial Time Series Forecasting](https://mlsanity.com/paper/2502.05878/) (2025)
- [BEDTime: A Unified Benchmark for Automatically Describing Time Series](https://mlsanity.com/paper/2509.05215/) (2025)
- [TimeHF: Billion-Scale Time Series Models Guided by Human Feedback](https://mlsanity.com/paper/2501.15942/) (2025)
- [Multimodal Conditioned Diffusive Time Series Forecasting](https://mlsanity.com/paper/2504.19669/) (2025)
- [TRACE: Grounding Time Series in Context for Multimodal Embedding and Retrieval](https://mlsanity.com/paper/2506.09114/) (2025)
- [Enhancing Multivariate Time Series Forecasting with Global Temporal Retrieval](https://mlsanity.com/paper/2602.10847/) (2026)
- [Large Language models for Time Series Analysis: Techniques, Applications, and Challenges](https://mlsanity.com/paper/2506.11040/) (2025)
- [Right Answer at the Right Time - Temporal Retrieval-Augmented Generation via Graph Summarization](https://mlsanity.com/paper/2510.16715/) (2025)
- [TimeSense:Making Large Language Models Proficient in Time-Series Analysis](https://mlsanity.com/paper/2511.06344/) (2025)
- [Retrieval-Augmented Generation with Covariate Time Series](https://mlsanity.com/paper/2603.04951/) (2026)
- [RareCP: Regime-Aware Retrieval for Efficient Conformal Prediction](https://mlsanity.com/paper/2605.08857/) (2026)
- [STRATA-TS: Selective Knowledge Transfer for Urban Time Series Forecasting with Retrieval-Guided Reasoning](https://mlsanity.com/paper/2508.18635/) (2025)
- [Enhancing few-shot time series forecasting with LLM-guided diffusion](https://mlsanity.com/paper/2602.00040/) (2026)
- [Align-RAG: Alignment Is All You Need for TSFM In-Context Learning](https://mlsanity.com/paper/2608.05571/) (2026)
- [JudgeCast: Time Series Forecasting with Experience-Informed Covariate Judgements](https://mlsanity.com/paper/2609.36966/) (2026)
- [GRAM: Correcting Frozen Time-Series Foundation Models via Graph-Retrieved Amplitude Memory](https://mlsanity.com/paper/2610.04827/) (2026)
- [ECHO: Correcting Time Series Foundation Model Forecasts with Historical Analogues and Errors](https://mlsanity.com/paper/2610.16433/) (2026)

## Abstract (arXiv)

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.
