Table of Contents
Fetching ...

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.

Agentic Retrieval-Augmented Generation for Time Series Analysis

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.
Paper Structure (23 sections, 6 equations, 1 figure, 18 tables)

This paper contains 23 sections, 6 equations, 1 figure, 18 tables.

Figures (1)

  • Figure 1: The figure illustrates the proposed agentic RAG framework, designed to handle diverse time series analysis tasks. The framework employs a hierarchical, multi-agent architecture. A master agent receives end-user questions and routes them to appropriate specialized sub-agents based on the specific time series task (e.g., forecasting, imputation, classification, anomaly detection). The sub-agents utilize pretrained SLMs fine-tuned on task-specific datasets using techniques like instruction tuning and direct preference optimization to capture spatio-temporal dependencies within and across the time series datasets. Each sub-agent maintains its own prompt pool as 'key-value' pairs, which stores relevant historical knowledge related to specific trends and patterns within its respective specialized domain. This allows the sub-agents to leverage related past experiences for improved task-specific predictions on new, similar data, and is then relayed back to the user through the master agent.