Skip to main content
Back

AgentMob Beats Every Training-Free LLM at Predicting Where You Go Next

AgentMob skips LLM calls for routine trips and only invokes iterative tool use when location signals are genuinely ambiguous, hitting 71% top-1 accuracy on GPS data

Pro

Paper, Full Access
  • AgentMob is a training-free LLM agent for next-location prediction that uses a fast path for routine trips and an iterative tool-calling slow path for ambiguous cases.
  • On hard non-routine cases, the LLM controller boosts top-1 accuracy from 30.65% to 48.62% over a same-tool statistical baseline on the BW dataset.
  • Overall best training-free LLM performance across three datasets: 71.42% on BW, 33.14% on YJMob100K, and 33.50% on Shanghai ISP using GPT-4.5.
  • Four tools are available to the agent: Mobility Context Retriever, Historical Location Retriever, Daily-Move Estimator, and Geographical Information Retriever -- called adaptively, up to 10 iterations.
  • Unlike prior agentic methods that always run all modules, AgentMob stops gathering evidence as soon as the LLM is confident, saving compute on easy predictions.
  • Code is open-source on GitHub; the framework is model-agnostic and requires no task-specific training data.

Predicting where someone will go next sounds deceptively simple. In practice, it is one of the harder problems in urban AI: human movement is mostly routine, but just irregular enough that the edge cases break most models. A new paper introduces AgentMob, a training-free LLM-driven agent framework that tackles this by treating next-location prediction as an adaptive decision process rather than a fixed inference pipeline.

A field caught between accuracy and explainability

Urban mobility prediction focuses on modeling and forecasting individual movements within cities based on historical patterns and factors such as time, urban structure, and activity purposes, and is essential for applications such as traffic management and location-based services. The stakes are real: better predictions feed into transit optimization, epidemic modeling, and urban simulation at scale.

The field has gone through two generations of approaches. With the rise of deep learning, sequence modeling approaches became prominent, represented by RNN-based methods such as DeepMove and LSTPM. These supervised models are accurate but brittle: they need task-specific training data, do not generalize across cities, and offer almost no insight into why they made a prediction. A shared motivation for LLM-based alternatives is that mobility datasets often contain heterogeneous and weakly structured information -- like POI semantics and trip context -- and LLMs are attractive because they can exploit semantic knowledge about places and activities and support few-shot or zero-shot prediction when conventional models struggle to generalize.

Recent research leverages LLMs as predictive models for urban mobility tasks using prompt engineering and few/zero-shot learning, with studies demonstrating LLMs' ability to predict individuals' next visits without city-specific training. But these approaches have a critical flaw: they rely on static prompts and single-pass inference. When the mobility signal is weak -- say, a user deviates from their usual Tuesday routine -- the model has no mechanism to go look for more evidence. It just guesses.

Comparison of three approaches: deep neural networks, LLM prompt engineering, and the proposed agentic framework for GPS trajectory prediction

Two speeds for two types of trips

AgentMob's core insight is that not all predictions are equally hard. Most of the time, people are creatures of habit: they go to work on weekday mornings, home in the evenings, the same gym on Saturdays. For these cases, burning LLM tokens on iterative reasoning is wasteful. For genuinely ambiguous cases -- irregular schedules, conflicting signals, sparse history -- you need more firepower.

The framework handles this with a two-path design:

  • Fast path: If historical regularity is strong enough (the user almost always goes to location X at this time on this day), AgentMob resolves the prediction directly from a statistical pattern without calling the LLM at all.
  • Slow path: If the fast path confidence is low, the LLM controller kicks in and iteratively invokes a set of tools to gather more evidence before making a decision.

The slow path is where the real engineering happens. The LLM controller can call up to four specialized tools in sequence, each time deciding whether it has enough evidence to commit to a prediction or needs to query another tool. This loop runs for a maximum of 10 iterations. The tools available are:

  • Mobility Context Retriever: fetches the user's recent trajectory to identify short-term patterns
  • Historical Location Retriever: looks up what the user typically does at this time of day and day of week
  • Daily-Move Estimator: estimates whether the user is likely to stay put or move at all
  • Geographical Information Retriever: pulls in spatial context about nearby locations and points of interest
Flowchart of AgentMob decision tree showing toolbox components and decision nodes for trajectory prediction

Crucially, the LLM does not just aggregate tool outputs at the end. It decides, after each tool call, whether the current evidence is sufficient to make a prediction or whether another tool should be invoked. This is adaptive evidence-controlled decision making -- the model stops gathering evidence as soon as it is confident, rather than always running all tools regardless of need.

What the numbers actually show

AgentMob was evaluated on three real-world mobility datasets with very different characteristics:

  • BW: A GPS trajectory dataset with dense, fine-grained location data
  • YJMob100K: An open-source, anonymized, metropolitan-scale, longitudinal dataset of 100,000 individuals' human mobility trajectories, using mobile phone location data from Yahoo Japan Corporation.
  • Shanghai ISP: A large-scale cellular network dataset from Shanghai

Using GPT-4.5 as the backbone, AgentMob achieves 71.42% Acc@1 on BW, 33.14% on YJMob100K, and 33.50% on Shanghai ISP -- the best overall performance among training-free LLM-based methods across all three datasets. The accuracy numbers look very different across datasets because the difficulty varies enormously: BW has richer GPS signals, while cell-tower data from YJMob100K and Shanghai ISP is noisier and coarser.

The most telling result is the ablation on BW's non-fast-path cases -- the hard, ambiguous predictions where the fast path declined to answer. On those cases, the LLM controller improves Acc@1 from 30.65% to 48.62% over a same-tool statistical baseline. That 18-point jump isolates the LLM's actual contribution: it is not just having the tools, it is the adaptive reasoning about which tools to use and when to stop.

Where it fits and where it falls short

AgentMob is squarely aimed at scenarios where you cannot or do not want to train a task-specific model. Training-free agentic LLM methods exhibit promising application potential, but performance still has significant room for improvement since they use commercial LLMs trained on general corpora without training on any mobility dataset. AgentMob narrows that gap considerably for the training-free category, but it does not close it -- fine-tuned supervised models still hold the overall accuracy crown.

There are practical limitations worth noting:

  • Latency and cost: The slow path can invoke up to 10 LLM calls per prediction. At scale, this is expensive. The fast path mitigates this for routine cases, but the cost profile for a high-ambiguity population is non-trivial.
  • Backbone dependency: Performance is tied to the underlying LLM. The paper uses GPT-4.5; results with smaller open-source models will likely be lower.
  • Accuracy ceiling: On the harder datasets (YJMob100K, Shanghai ISP), top-1 accuracy in the low 30s reflects the fundamental difficulty of coarse-grained cell-tower data, not a failure of the method.

The real unlock: interpretable decisions on hard cases

The headline numbers matter, but the deeper contribution is architectural. Previous LLM-based mobility methods like AgentMove decomposed the task into fixed sub-modules that always ran. They directly generate the final output using LLMs without systematic design, which limits the potential of LLMs to uncover complex mobility patterns. AgentMob introduces a controller that reasons about its own uncertainty and decides dynamically how much evidence to collect.

This matters for real deployments. A system that can explain "I predicted this location because the user's last three Thursdays all ended here, and the geographical retriever confirmed there is a gym at that coordinate" is far more useful for urban planning or policy analysis than a black-box sequence model. The evidence trail is a byproduct of the architecture, not an afterthought.

Practical use cases where this approach makes sense:

  • Urban simulation and agent-based city modeling where interpretable individual behavior is needed
  • Cross-city deployment where training data for the target city is unavailable
  • Transportation policy analysis where decision transparency is a requirement
  • Cold-start scenarios for new users with limited trajectory history
  • Anomaly detection in mobility patterns, where the slow path's evidence gathering surfaces the reason for unusual behavior

The code is publicly available on GitHub, and the framework is model-agnostic -- you can swap in any LLM as the controller. Given the paper's results with GPT-4.5, it will be interesting to see how much the fast-path/slow-path split changes as frontier models get faster and cheaper to run.