Use an LLM-based agent with memory, world knowledge, and a graph tool to improve zero-shot next-location prediction

August 26, 20247 min

Overview

Production Readiness

0.5

Novelty Score

0.7

Cost Impact Score

0.3

Citation Count

1

Authors

Jie Feng, Yuwei Du, Jie Zhao, Yong Li

Links

Abstract / PDF

Why It Matters For Business

AgentMove improves zero-shot location ranking across cities without retraining a local model, so companies can prototype personalized recommendations or prefetching where labeled local mobility data is scarce.

Summary TLDR

AgentMove is an LLM-based agent pipeline for next-location prediction. It splits the task into three modules: a spatial-temporal memory that stores short- and long-term user behavior, a world-knowledge generator that asks an LLM to propose multi-scale urban candidates using text addresses (via OpenStreetMap), and a collective extractor that builds a global location-transition graph (NetworkX) to leverage other users' patterns. Combined results are post-processed by an LLM to output ranked location candidates. On two datasets (Foursquare + ISP) across 12 cities, AgentMove beats prior baselines on 8/12 metrics with reported improvements of about 3.3%–8.6% in many cases, shows more stable cross

Problem Statement

Deep models need lots of local mobility data and do not generalize zero-shot. LLMs can reason zero-shot but prior LLM approaches produce final outputs directly and miss domain structure: individual memory, urban structure, and population-level patterns. The paper asks: can a structured LLM agent that adds memory, explicit world knowledge, and a graph-based social view improve zero-shot next-location prediction?

Main Contribution

AgentMove: an LLM-based agentic pipeline that decomposes next-location prediction into three subproblems and recombines their outputs.

Spatial-temporal memory module with short-term, long-term memory and a dynamic user profile to capture individual habits.

World knowledge generator that aligns coordinates to text addresses (OpenStreetMap) and asks LLMs to propose multi-scale candidate places to model exploration.

Collective knowledge extractor that builds a global undirected location-transition graph (NetworkX) to surface locations visited by similar users.

Extensive zero-shot evaluation on Foursquare and an ISP GPS dataset showing consistent gains and lower geographic variability across cities.

Key Findings

AgentMove wins most metrics versus baselines in zero-shot tests

NumbersBest results in 8 of 12 metrics; improvements range 3.33%–8.57%

Combining modules yields the largest gains

Numbers+7% to +45% vs base prompt in select metrics

World Knowledge Generator increases exploration of new places

NumbersLocation return rate drops e.g., Llama3-70B: 90%→87.5% (FSQ) and 85.4%→73.2% (ISP)

Results

Acc@1 (FSQ@Tokyo)

ValueAgentMove 0.185

BaselineGETNext 0.205

Acc@5 (FSQ@Tokyo)

ValueAgentMove 0.465

BaselineGETNext 0.450

NDCG@5 (ISP@Shanghai)

ValueAgentMove 0.329

BaselineGETNext 0.308

Who Should Care

What To Try In 7 Days

Build a lightweight memory store (short + long) for user sessions and generate simple profile prompts for an LLM.

Use OpenStreetMap reverse-geocoding to attach text addresses to POIs and prompt an LLM for multi-scale candidate POIs.

Construct a small location-transition graph (NetworkX) from historical logs and query k-hop neighbors as extra candidates.

Agent Features

Memory

  • short-term memory
  • long-term memory
  • user profile summaries

Planning

  • manual task decomposition into 3 subtasks
  • final reasoning step that merges outputs

Tool Use

  • NetworkX (graph queries)
  • OpenStreetMap (address lookup)
  • LLM APIs (GPT4o-mini, Llama variants)

Frameworks

  • agent pipeline (planning, memory, tools, reasoning)

Is Agentic

true

Architectures

  • LLM-based agent pipeline
  • modular decomposition (memory / world / collective / reasoning)

Collaboration

  • aggregated population graph for shared patterns

Reproducibility

Data Urls

Code Available

Data Available

Open Source Status

  • partial

Risks & Boundaries

Limitations

  • LLM hallucination: generated addresses/POIs can be false and need verification.
  • High inference cost: LLM API calls make large-scale deployment expensive.
  • Geospatial bias: LLM training data causes variable accuracy across cities.
  • Evaluation scale limited: test sampling (200 instances per city) and cost restricts breadth.

When Not To Use

  • Real-time, high-throughput systems where LLM latency and cost are prohibitive.
  • Applications that require provable location accuracy without external validation.
  • Privacy-sensitive settings that forbid sending user traces to third-party LLMs.

Failure Modes

  • Hallucinated candidate POIs leading to invalid predictions.
  • Sparse or mismatched address lookups causing poor world-alignment.
  • Graph sparsity when historical data are limited, reducing collective signal.
  • Performance depends strongly on base LLM quality and size.

Core Entities

Models

  • AgentMove
  • LLM-Move
  • LLM-ZS
  • LLM-Mob
  • GETNext
  • STHGCN
  • DeepMove

Metrics

  • Accuracy
  • NDCG@5

Datasets

  • Foursquare (Yang et al. 2016)
  • ISP GPS trajectory (Shanghai) (Feng et al. 2019)

Benchmarks

  • Zero-shot next-location prediction on 12-city split (Foursquare) and ISP Shanghai