UrbanLLM: Autonomous Urban Activity Planning and Management with Large Language Models

Yue Jiang, Qin Chao, Yile Chen, Xiucheng Li, Shuai Liu, Gao Cong

Abstract

Location-based services play a critical role in improving the quality of our daily lives. Despite the proliferation of numerous specialized AI models within the spatio-temporal context of location-based services, these models struggle to autonomously tackle problems regarding complex urban planning and management. To bridge this gap, we introduce UrbanLLM, a fine-tuned large language model (LLM) designed to tackle diverse problems in urban scenarios. UrbanLLM functions as a problem-solver by decomposing urban-related queries into manageable sub-tasks, identifying suitable spatio-temporal AI models for each sub-task, and generating comprehensive responses to the given queries. Our experimental results indicate that UrbanLLM significantly outperforms other established LLMs, such as Llama and the GPT series, in handling problems concerning complex urban activity planning and management. UrbanLLM exhibits considerable potential in enhancing the effectiveness of solving problems in urban scenarios, reducing the workload and reliance on human experts.

Introduction

Modern urban environments are data-rich but operationally fragmented. While the AI community has developed highly accurate "narrow" models for specific tasks—such as predicting traffic flow, estimating arrival times, or monitoring parking availability—these models typically operate in isolation. They lack the communicative framework to collaborate on complex, multi-step human queries. For example, a request like, "I want to go to Jurong East for dinner; I’m leaving at 6 PM, where should I park?" requires a system to identify destinations, predict travel times based on traffic, locate car parks, and forecast availability at the specific time of arrival.

General-purpose Large Language Models (LLMs) like GPT-4 often lack the specific geospatial "common sense" or the logical consistency required to chain these specialized tools without hallucinating. UrbanLLM addresses this gap by serving as a bridge between natural language reasoning and technical spatio-temporal execution.

Methodology

UrbanLLM is built upon a two-phase framework: Instruction Tuning and Inference Orchestration.

1. The Learning Phase (Instruction Tuning)

The researchers fine-tuned a Llama-2-7B model using a structured "self-instruct" dataset. Unlike standard fine-tuning, this approach utilized a template that trained the model on three critical components:

  • Scenario Formulation: Defining the specific scope and constraints of the urban problem.
  • Task Understanding: Learning the functional capabilities of 13 specific spatio-temporal sub-tasks, such as "Time Series Imputation" or "Arrival Time Estimation."
  • Causal Understanding: Recognizing logical dependencies—for instance, acknowledging that parking availability cannot be predicted until an estimated arrival time is established.

2. The Inference Phase (The Pipeline)

When processing a user query, UrbanLLM follows a three-stage pipeline to ensure accuracy and groundedness:

  • Spatio-Temporal Analysis: The model decomposes the natural language query into a JSON-formatted list of sub-tasks.
  • Model Matching: It identifies the optimal specialized AI model from a "Model Zoo" containing over 50 pre-trained experts (e.g., DCRNN for traffic forecasting or AGCRN for general spatio-temporal predictions).
  • Results Generation: The system executes the selected models, retrieves the necessary data, and synthesizes the findings into a coherent response.

Data and Evaluation

The study primarily utilized the urban landscape of Singapore as its testing ground. The training and evaluation data consisted of:

  • Self-Instruct Dataset: 15,249 training examples and 1,694 evaluation examples generated via GPT-4-preview based on 170 expert seed prompts.
  • Human-Annotated Dataset: A "gold standard" benchmark of 200 complex queries curated by five urban domain experts to test real-world utility.
  • Real-World Data Sources: Integration with the Singapore Open Data API, providing real-time and historical data on weather, bus locations, and parking.

Key Insights

  • Orchestration over Calculation: The core strength of UrbanLLM lies in its role as a "manager." By focusing the LLM on task decomposition rather than raw mathematical calculation, the framework bypasses the inherent quantitative weaknesses of standard transformers.
  • Structured Reasoning: The inclusion of a dependency field in the JSON output allows the model to handle multi-step logic far more reliably than standard chat interfaces.
  • Zero-Shot Generalization: Despite being trained on Singapore-specific data, UrbanLLM demonstrated a remarkable ability to decompose queries for other major cities like Beijing and New York City, suggesting that the underlying logic of urban planning is globally applicable.

Results and Performance

UrbanLLM demonstrated a significant performance advantage over larger, general-purpose models:

  • Overall Accuracy: UrbanLLM achieved 68.3% accuracy in task decomposition, compared to 49.99% for GPT-4o and 5.31% for Llama-3-8B.
  • Handling Complexity: In scenarios requiring multiple sequential steps, UrbanLLM maintained 59.08% accuracy, while GPT-4o’s performance dropped to 40.13%.
  • Ablation Studies: Removing "Scenario Formulation" and "Causal Understanding" from the training prompts caused accuracy to drop from 68.3% to 57.02%, confirming that structured reasoning is essential for urban problem-solving.

Limitations and Future Work

While UrbanLLM represents a significant step forward, it is currently limited by the reasoning capacity of its base model (Llama-2-7B). Furthermore, the system may struggle with "black swan" urban events—such as unannounced construction or sudden public gatherings—that are not yet captured by the underlying specialized models. Future research will focus on expanding the training data to more diverse global cities and developing more computationally efficient fine-tuning techniques to lower the barrier for municipal adoption.

Summary updated

BibTeX
@inproceedings{jiang2024urbanllm,
  author = {Yue Jiang and Qin Chao and Yile Chen and Xiucheng Li and Shuai Liu and Gao Cong},
  title = {{UrbanLLM: Autonomous Urban Activity Planning and Management with Large Language Models}},
  booktitle = {Conference on Empirical Methods in Natural Language Processing},
  year = {2024},
  doi = {10.18653/v1/2024.findings-emnlp.98},
}
Figure