WWW2026
Cross-city Time Series Forecasting with Retrieval-Augmented Large Language Models
Yue Jiang, Chenxi Liu, Yile Chen, Qin Chao, Shuai Liu, Cheng Long, Gao Cong
Abstract
The World Wide Web increasingly relies on intelligent services that require accurate time series forecasting, from urban mobility platforms to adaptive web-based decision systems. In practice, building effective forecasting models typically requires abundant high-quality data, which may not always be available in all cities due to sensing limitations or data sparsity. To address this challenge, transfer learning methods aim to transfer knowledge from data-rich source cities to data-scarce target cities. However, source and target data distributions are often not identical: while some patterns from source cities may be beneficial, others can be irrelevant or even misleading. Existing transfer learning methods generally train the target model using all available source data without explicitly distinguishing between useful and non-useful knowledge, which may hinder performance. In this work, we propose xRAG4TS, a novel framework that integrates Retrieval-Augmented Generation (RAG) with Large Language Models (LLMs) for cross-city time series forecasting. xRAG4TS introduces a Cross-City Selective Retriever Module that filters semantically relevant historical patterns and documents from data-rich source cities, and incorporates them as structured prompts in an LLM Inference Module to guide forecasting in data-scarce target cities. By enabling selective, interpretable, and context-aware knowledge transfer, our method enhances robustness and scalability in web-oriented spatio-temporal applications. Extensive experiments on real-world cross-city datasets demonstrate that xRAG4TS significantly outperforms state-of-the-art baselines, highlighting its potential for powering adaptive and trustworthy web services under severe data scarcity.