SYNTOLOGY HomeExplorerAtlasCodeMethodologyAboutDevelopersFeedPricing
Paper · 2308.15197 · 2023

Where Would I Go Next? Large Language Models as Human Mobility Predictors

arXiv · PDF · Open in the Atlas

Code that ran

3 of 3 samples (functions and classes) lifted from this paper's linked repositories executed on a synthesized input in Syntology's jail (0 of them constructed an object rather than computing a result; 0 honoured the contract we drafted, 0 violated it and 0 have no contract verdict; 3 failures of our instrument; 0 no recorded run), measured 2026-11-24; repository links from the Papers with Code archive attributed under CC BY-SA, no affiliation; bodies inline only under a permissive licence as GitHub detects it. Not a reproduction of the paper's results.

"Ran" means the function executed on a synthesized input and returned a value. It is not a reproduction of the paper's results. This record, dated, as JSON: /api/ran/2308.15197.json · badge: /api/ran/2308.15197.svg

Each repository's role is a label: a classifier's output recorded on the link, or, where no role is recorded, what the Papers with Code archive marked. The line under it names its basis. Neither says who wrote the code.

RepositoryRoleRan
xlwang233/llm-mob canonical (classifier label)
classifier basis: census
3 ran · 0 no recorded run
FunctionStatusWhere it lives
convert_to_12_hour_clock Ran
ran; our contract draft was wrong, not the code
xlwang233/llm-mob/llm-mob.py
code served (permissive licence) · get_code("3dd52b32d8265d75")
How it ran

Ran in Syntology's sandbox on this synthesized input (drafted by a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API) and returned str. The image it ran in was not recorded. If your copy returns the same type on these inputs, it matched what we observed; nothing here checks that. It does NOT mean the output is correct: nothing has compared it to the paper.

# Setup code for convert_to_12_hour_clock function

ARGS = {
    'minutes': 720
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
none outside the standard library — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type str — a str output has no array shape of its own; none is stated — the instrument coerces any output to an array; for a str output the recorded ndim 0 and dtype family float describe that coercion, not the output, and are not stated
Environment
image not recorded; re-verify against syntology-harvest-sandbox:v5-deps; not recorded for this sample: the harness installs a cuda-to-cpu shim (cuda_shim.py) before every sample and no run records whether a sample needed it; seed: none by the harness; any seed is in the setup block
get_chat_completion Ran
ran; our contract draft was wrong, not the code
xlwang233/llm-mob/llm-mob.py
code served (permissive licence) · get_code("6589009f496808b6")
How it ran

Ran in Syntology's sandbox on this synthesized input (drafted by a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API) and returned Mock. The image it ran in was not recorded. If your copy returns the same type on these inputs, it matched what we observed; nothing here checks that. It does NOT mean the output is correct: nothing has compared it to the paper.

from unittest.mock import Mock, MagicMock

# Create a mock OpenAI client object that mimics the 1.x version
client = Mock()

# Create a mock completion response
mock_completion = Mock()
mock_completion.choices = [Mock(message=Mock(content="This is a test response"))]

# Set up the client.chat.completions.create method to return our mock completion
client.chat.completions.create = MagicMock(return_value=mock_completion)

# Define the prompt
prompt = "What is the capital of France?"

# Define model parameter
model = 'gpt-3.5-turbo-0613'

# Define json_mode parameter
json_mode = False

# Define max_tokens parameter
max_tokens = 1200

# Construct the ARGS dictionary with all parameters
ARGS = {
    'client': client,
    'prompt': prompt,
    'model': model,
    'json_mode': json_mode,
    'max_tokens': max_tokens
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
none outside the standard library — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type Mock — a Mock output has no array shape of its own; none is stated
Environment
image not recorded; re-verify against syntology-harvest-sandbox:v5-deps; not recorded for this sample: the harness installs a cuda-to-cpu shim (cuda_shim.py) before every sample and no run records whether a sample needed it; seed: none by the harness; any seed is in the setup block
get_dataset Ran
ran; our contract draft was wrong, not the code
xlwang233/llm-mob/llm-mob.py
code served (permissive licence) · get_code("1fc272083b812526")
How it ran

Ran in Syntology's sandbox on this synthesized input (drafted by a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API) and returned tuple. The image it ran in was not recorded. If your copy returns the same type on these inputs, it matched what we observed; nothing here checks that. It does NOT mean the output is correct: nothing has compared it to the paper.

import os
import pickle
import pandas as pd
import tempfile
import shutil

# Create temporary directory structure for the function
temp_dir = tempfile.mkdtemp()
data_dir = os.path.join(temp_dir, 'data', 'geolife')
os.makedirs(data_dir, exist_ok=True)

# Create sample train CSV
train_data = pd.DataFrame({
    'user_id': [1, 1, 2, 2],
    'start_day': [1, 2, 1, 3],
    'start_min': [10, 20, 15, 25],
    'duration': ['100', '200', '150', '300']
})
train_data.to_csv(os.path.join(data_dir, 'geolife_train.csv'), index=False)

# Create sample valid CSV
valid_data = pd.DataFrame({
    'user_id': [1, 3],
    'start_day': [5, 2],
    'start_min': [30, 45],
    'duration': ['250', '180']
})
valid_data.to_csv(os.path.join(data_dir, 'geolife_valid.csv'), index=False)

# Create sample test pickle file
test_file = [
    {'user_id': 2, 'start_day': 7, 'start_min': 50},
    {'user_id': 3, 'start_day': 8, 'start_min': 60}
]
with open(os.path.join(data_dir, 'geolife_testset.pk'), 'wb') as f:
    pickle.dump(test_file, f)

# Change to temp directory so relative paths work
original_dir = os.getcwd()
os.chdir(temp_dir)

ARGS = {
    'dataname': 'geolife'
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
pandas — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type tuple — a tuple output has no array shape of its own; none is stated
Environment
image not recorded; re-verify against syntology-harvest-sandbox:v5-deps; not recorded for this sample: the harness installs a cuda-to-cpu shim (cuda_shim.py) before every sample and no run records whether a sample needed it; seed: none by the harness; any seed is in the setup block

Also present in other papers' code

Of 3 samples lifted from this paper's linked repositories, 3 carry a function identity and 0 do not. Of the 3 distinct functions with an identity, 1 are also present in other papers whose code we hold (0 with at least one paper dated earlier, 0 the same month, 1 later) and 2 are only here among the 52,977 papers whose code Syntology holds (as of 2026-09-26).

Only here means: among the 52,977 papers whose code Syntology holds (51,887 with lifted samples, 1,090 through their assemblies only), as of 2026-09-26, no other paper's lifted samples or current assembly bricks contain an identical function body after normalisation.

FunctionAlso present inEarliest-datedOthers named
convert_to_12_hour_clock 1 other paper
1 later
2406.13945 (2024-06)
CityBench: Evaluating the Capabilities of Large Language Models for Urban Tasks

Presence, not direction: an identical function body in two papers' repositories does not say who wrote it, which came from which, or that either paper's method rests on it. Matching is exact after normalisation, so a renamed or edited function is not matched. Dates are when papers appeared, not when code was written. Only .py files the harvester lifted are covered; notebooks are not read. A new-style arXiv id YYMM.NNNN dates a paper to the month 20YY-MM; otherwise Paper.year dates it to the year; otherwise it is undated. Dates are when the paper appeared, not when the code was written. Read 2026-11-24.

Repositories linked to this paper

Some links come from the archived Papers with Code dataset (CC BY-SA 4.0): attribution and licence.

Abstract

Accurate human mobility prediction underpins many important applications across a variety of domains, including epidemic modelling, transport planning, and emergency responses. Due to the sparsity of mobility data and the stochastic nature of people's daily activities, achieving precise predictions of people's locations remains a challenge. While recently developed large language models (LLMs) have demonstrated superior performance across numerous language-related tasks, their applicability to human mobility studies remains unexplored. Addressing this gap, this article delves into the potential of LLMs for human mobility prediction tasks. We introduce a novel method, LLM-Mob, which leverages the language understanding and reasoning capabilities of LLMs for analysing human mobility data. We present concepts of historical stays and context stays to capture both long-term and short-term dependencies in human movement and enable time-aware prediction by using time information of the prediction target. Additionally, we design context-inclusive prompts that enable LLMs to generate more accurate predictions. Comprehensive evaluations of our method reveal that LLM-Mob excels in providing accurate and interpretable predictions, highlighting the untapped potential of LLMs in advancing human mobility prediction techniques. We posit that our research marks a significant paradigm shift in human mobility modelling, transitioning from building complex domain-specific models to harnessing general-purpose LLMs that yield accurate predictions through language instructions. The code for this work is available at https://github.com/xlwang233/LLM-Mob.

For agents

The same record, over MCP at https://syntology.ai/mcp:

get_harvested_code_for_paper("2308.15197")
get_code_for_paper("2308.15197")
have("2308.15197")

The run record, dated, one paper per request, free:

curl https://syntology.ai/api/ran/2308.15197.json

A badge for a README (the split and the date, never a ratio):

[![Syntology run record](https://syntology.ai/api/ran/2308.15197.svg)](https://syntology.ai/paper/2308.15197)

Connect an agent — have() is free.