Abstract
Urban planning and management increasingly rely on specialized AI models for tasks such as traffic forecasting and parking availability. However, these models often operate in isolation, making it difficult for residents to obtain integrated answers to complex queries. This paper presents UrbanLLM, a framework that fine-tunes Large Language Models (LLMs) to act as autonomous "urban orchestrators." By decomposing natural language queries into structured spatio-temporal sub-tasks and interfacing with a "model zoo" of specialized AI tools, UrbanLLM bridges the gap between human intent and expert execution. Our results show that UrbanLLM achieves 68.3% accuracy in complex task decomposition, significantly outperforming general-purpose models like GPT-4o.
Introduction
Modern urban management is data-driven, yet the specialized AI models used for various city functions—such as ETA estimation, parking prediction, and traffic flow—exist in silos. A typical user query, such as "I want to go to Jurong East for dinner, leaving at 6 PM; where can I park?", requires a chain of reasoning that involves calculating travel time, identifying nearby car parks, and predicting occupancy at the arrival time. General-purpose LLMs lack the geospatial common sense and the reliable tool-interfacing capabilities needed for such tasks. UrbanLLM addresses this by providing a reasoning layer that translates human intent into a coordinated execution of expert AI tools.
Methodology
The UrbanLLM framework is developed through a two-phase approach: a learning phase for instruction-tuning and an inference phase for autonomous execution.
Learning Phase
We fine-tuned a Llama-2-7B model using QLoRA, focusing on scenario formulation, task understanding, and causal reasoning. The model was trained to map queries to 13 specific spatio-temporal sub-tasks, such as trajectory prediction and anomaly detection, while identifying dependencies between these tasks.
Inference Pipeline
When a user submits a query, UrbanLLM follows a three-stage pipeline:
- Spatio-Temporal Analysis: The LLM decomposes the query into a structured JSON format, outlining necessary steps and dependencies.
- Model Matching: The system selects the most appropriate model for each sub-task from a "model zoo" containing over 50 specialized AI tools.
- Results Generation: The selected models are executed, and the LLM synthesizes their outputs into a natural language response.
Dataset Construction
To support training and evaluation, we developed a comprehensive dataset ecosystem:
- Seed Prompts: 170 expert-curated prompts based on Singapore urban scenarios.
- Self-Instruct Dataset: 15,249 synthetic training examples generated via GPT-4.
- Human-Annotated Benchmark: A "gold standard" set of 200 queries from domain experts.
- Real-world Data: Integration with the Singapore Open Data API for real-time urban metrics.
Results and Discussion
UrbanLLM demonstrates a substantial performance leap over state-of-the-art models. In complex task decomposition, UrbanLLM achieved 68.3% accuracy, compared to 49.9% for GPT-4o and 5.3% for Llama-3-8B. In simpler, single-task scenarios, its precision reached 95.78%.
Expert evaluations further confirmed its superiority, with UrbanLLM maintaining a 55% accuracy rate on the human-annotated benchmark, while GPT-4o hovered around 40%. Qualitatively, UrbanLLM proved capable of autonomously retrieving correct data streams, whereas general models often required manual data input from the user.
Conclusion
UrbanLLM successfully demonstrates the potential of LLMs as orchestrators for complex urban planning. By moving beyond simple text generation to structured task management, the framework provides a scalable solution for integrating siloed urban AI models. Future work will focus on expanding the model's geospatial knowledge to more diverse global cities and improving the efficiency of the fine-tuning process.
Summary updated