A gent M ove: A Large Language Model based Agentic Framework for Zero-shot Next Location Prediction (2025)

Abstract: Next location prediction plays a crucial role in various real-world applications. Recently, due to the limitation of existing deep learning methods, attempts have been made to apply large language models (LLMs) to zero-shot next location prediction task. However, they directly generate the final output using LLMs without systematic design, which limits the potential of LLMs to uncover complex mobility patterns and underestimates their extensive reserve of global geospatial knowledge. In this paper, we introduce AgentMove, a systematic agentic prediction framework to achieve generalized next location prediction. In AgentMove, we first decompose the mobility prediction task and design specific modules to complete them, including spatial-temporal memory for individual mobility pattern mining, world knowledge generator for modeling the effects of urban structure and collective knowledge extractor for capturing the shared patterns among population. Finally, we combine the results of three modules and conduct a reasoning step to generate the final predictions. Extensive experiments utilizing mobility data from two distinct sources reveal that AgentMove surpasses the leading baseline by 3.33% to 8.57% across 8 out of 12 metrics and it shows robust predictions with various LLMs as base and also less geographical bias across cities. Our codes are available via https://github.com/tsinghua-fib-lab/AgentMove.

## introduction mobility prediction is of great importance in many real-world scenarios, e.g., recommending travel services, pre-activating mobile applications for potential usage, seamless switching of cellular network signals and efficient traffic management. next location prediction is one of the most important task in human mobility prediction. in recent years, deep learning based models @xcite @xcite @xcite have been widely applied and have achieved promising results due to their ability to capture the high-order transition dynamics and mining shared mobility patterns among users. however, existing approaches have several key drawbacks. first, the success of deep learning models rely on the collection of large amounts of private mobility data. second, the trained model are challenging to apply in zero-shot mobility prediction settings. finally, the prediction accuracy remains limited due to the constrained sequential modelling capability of smaller deep learning models and a lack of deep understanding of commonsense in human daily life and urban structures. recently, large language models (llms) have made significant progress, achieving advanced results that far surpass previous methods in areas such as dialogue-based role-playing, code generation and testing, and mathematics problem solving. in the field of spatial-temporal data mining, researchers are exploring the potential of applying llms to various real-world tasks, including time series forecasting @xcite , travel planning @xcite , trajectory analysis @xcite @xcite . furthermore, several recent works @xcite investigate the feasibility of using llms as the base model of mobility prediction, addressing the limitations of deep learning based models and achieving promising results. these works typically convert trajectories to a language based sentence and leverage the powerful sequential modelling capacities of llms to directly generate the mobility predictions. however, due to the lack of a systematic design throughout the entire process, they overlook the crucial components of human mobility modeling, resulting in limited performance. in summary, these methods fail to effectively capture the complex individual mobility patterns, neglect to model the effects of urban structure and do not discover the shared mobility patterns among populations. in this paper, we propose agentmove, a systematic agentic framework for generalized mobility prediction. by integrating domain knowledge of human mobility, we implement the core components in the general agentic framework @xcite , including the planning module, memory module, world knowledge module, external tool module and reasoning module. for the planning module in agentmove, we introduce a manually designed mobility prediction task decomposition module that considers the most important factors influencing mobility prediction. this decomposition generates three sub-tasks: individual mobility pattern mining, shared mobility pattern discovery and urban structure modelling. first, we implement a spatial-temporal memory module for individual mobility pattern mining. this module contains three submodules-short-term memory, long-term memory and user profiles-to capture the multi-level mobility patterns of individuals. compared to pure llm methods, the memory module enables agentmove to retain past mobility history and efficiently learn from experiences. second, we design a world knowledge generator to explicitly extract inherent geospatial knowledge from llms, aiding in the modelling the effects of multi-scale urban structures on the human mobility, particularly in relation to the exploration behavior of human mobility. third, we equip agentmove with the capability to discover the shared mobility patterns from various user trajectories through a collective knowledge extractor. this extractor utilizes net-workx as an external tool to organize trajectories into a global location transition graph and then extract important neighboring locations for prediction. finally, we combine the results from all the modules and perform a final reasoning step to generate the predictions. in summary, our contributions are as follows, ## preliminaries we define the mobility prediction task and related concepts for use in the following section. test train llm dl model random intitialize text pretrained trajectory converter converter 3 2 1 4 ? 3 2 1 4 5 next location prediction dev definition 1 (location) a location point @xmath0, cate, lon, lat, addr⟩, where id is the unique identifier, cate is the category (e.g., restaurant), lon and lat are the coordinates of the location, addr is the text address of location. definition 2 (user trajectory) a trajectory of user @xmath1, t 1 ), (p 2 , t 2 ), . . . , (p n , t n )}, where p @xmath2. definition 3 (contextual stays) contextual stays of user u is defined as the most recent sub-sequence in trajectory: c @xmath3, t n-k ), . . . , (p n-1 , t n-1 ), (p n , t n )}, which captures the user's short-term mobility patterns. k is the window size of contextual stays. definition 4 (historical stays) historical stays of user u is defined as the subsequence before contextual stays: h @xmath4, t 1 ), (p 2 , t 2 ), . . . , (p n-k-1 , t n-k-1 )}, which captures the user's long-term mobility patterns. given the historical movement data c u , h u as well as available external knowledge k (e.g., worldwide geospatial information), the objective is to predict the next location p n+1 that user u will visit. formally, this paper aims to learn a mapping function f : ## conclusion in this paper, we propose agentmove, a systematic agentic framework for generalized human mobility prediction applicable worldwide. we design a spatial-temporal memory module and a collective knowledge extractor to learn both individual mobility patterns and shared mobility pattern among users. furthermore, we develop a world knowledge generator that utilizes text-based address to understand urban structures in a manner similar to humans. extensive experiments on trajectories from 12 cities demonstrate the superiority and robustness of agentmove for mobility prediction. in the future, we plan to explore more effective ways to extract and leverage the vast world knowledge and common sense of llms for mobility modeling and trajectory mining. additionally, we aim to extend the framework to other trajectory data mining tasks, such as trajectory classification and generation. we believe that llm-based agents, like agentmove, hold great potential and adaptability, paving the way for a new paradigm in spatial-temporal modeling alongside deep learning.