Agentic Retrieval-Augmented Generation for Time Series Analysis
Chidaksh Ravuru, Sagar Srinivas Sakhinana, Venkataramana Runkana
TL;DR
The paper tackles time series analysis under distribution shifts and missing data by introducing Agentic-RAG, a hierarchical multi-agent framework where a master controller delegates tasks to task-specific sub-agents that leverage internal prompt pools and fine-tuned small language models. A dynamic prompting mechanism retrieves relevant historical patterns to condition predictions, while instruction-tuning and Direct Preference Optimization align model outputs with task goals. Extensive experiments across forecasting, anomaly detection, imputation, and classification on real-world multivariate datasets demonstrate competitive or state-of-the-art performance and validate the importance of each component via ablation. The work offers a modular, scalable approach to time-series tasks that can adapt to diverse datasets and nonstationary patterns.
Abstract
Time series modeling is crucial for many applications, however, it faces challenges such as complex spatio-temporal dependencies and distribution shifts in learning from historical context to predict task-specific outcomes. To address these challenges, we propose a novel approach using an agentic Retrieval-Augmented Generation (RAG) framework for time series analysis. The framework leverages a hierarchical, multi-agent architecture where the master agent orchestrates specialized sub-agents and delegates the end-user request to the relevant sub-agent. The sub-agents utilize smaller, pre-trained language models (SLMs) customized for specific time series tasks through fine-tuning using instruction tuning and direct preference optimization, and retrieve relevant prompts from a shared repository of prompt pools containing distilled knowledge about historical patterns and trends to improve predictions on new data. Our proposed modular, multi-agent RAG approach offers flexibility and achieves state-of-the-art performance across major time series tasks by tackling complex challenges more effectively than task-specific customized methods across benchmark datasets.
