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.
Introduction
Predicting an individual's next location is a fundamental task for urban planning, traffic management, and personalized services. Traditional deep learning (DL) models, while effective, suffer from significant "pain points": they require massive amounts of private training data, struggle to generalize to new cities (the zero-shot problem), and often lack the "common sense" context required to understand complex human mobility patterns.
While Large Language Models (LLMs) offer a promising alternative due to their vast pre-trained knowledge, early attempts at using them for mobility prediction have been "naive"—often feeding raw coordinates directly into prompts. This approach fails to leverage the nuanced spatial-temporal hierarchies and social patterns inherent in human movement. AgentMove addresses these gaps by treating next-location prediction as a multi-step reasoning task performed by an agentic framework.
The AgentMove Framework
AgentMove decomposes the complex mobility prediction task into specialized modules that mimic human cognitive processes and leverage structured geospatial data.
The framework consists of five core components:
- Task Decomposition: The system breaks the prediction problem into sub-tasks: mining individual patterns, understanding urban structure, and capturing collective social behavior.
- Spatial-Temporal Memory: This module stores Long-term Memory (general habits), Short-term Memory (recent visits), and a User Profile that summarizes the user's mobility persona (e.g., a "commuter" or "frequent traveler").
- World Knowledge Generator: Recognizing that LLMs process text better than coordinates, AgentMove converts GPS data into hierarchical text addresses (District → Block → Street → POI) using OpenStreetMap. It then prompts the LLM to hypothesize potential exploration areas based on the city's layout.
- Collective Knowledge Extractor: This module uses external tools like NetworkX to build a "Location Transition Graph" from aggregate user data, helping the agent understand shared patterns among similar users.
- Reasoning & Prediction: A final reasoning step synthesizes memory, urban layout, and social trends to generate a prediction accompanied by a logical justification.
Experimental Evaluation
The researchers evaluated AgentMove across 12 diverse cities using two primary datasets: the Global Foursquare Check-in Data (covering 415 cities) and dense ISP GPS Trajectory Data from Shanghai. These datasets allowed for testing geographical robustness and performance on high-frequency movement data.
Key Results
AgentMove demonstrated superior performance in a zero-shot setting, outperforming state-of-the-art deep learning baselines (such as GETNext and STHGCN) by 3.33% to 8.57% across most metrics.
The framework showed consistent performance regardless of the base LLM used (e.g., Llama-3, GPT-4o-mini) and significantly reduced the performance gap between different cities, mitigating the geographical bias often found in standard LLMs.
Discussion and Future Work
A critical finding of this work is the importance of textual representation. LLMs perform significantly better when locations are described as hierarchical text addresses rather than raw coordinates, as it allows them to tap into their pre-trained "world knowledge" about urban organization. Furthermore, AgentMove effectively balances "return" vs. "explore" behaviors by using the Memory module for habitual returns and the World Knowledge module for exploration.
Despite its success, AgentMove faces challenges regarding high inference costs and the potential for LLM "hallucinations" of non-existent addresses. Future work will focus on scaling the framework using smaller, distilled LLMs to reduce costs and exploring the privacy implications of collective transition graphs.
Summary updated