Adapting large language models for urban trip purpose inference: A domain-informed textual representation and fine-tuning framework
Understanding why people travel is fundamental to activity-based travel demand modelling and transport policy analysis. However, conventional trip purpose inference methods typically represent mobility contexts using predefined numerical or categorical features, which may discard semantic information contained in raw contextual data, thereby limiting their ability to represent and distinguish diverse travel-related contexts. To address this gap, this study proposes TripPurpose LLM, a domain-informed trip purpose inference framework based on large language models (LLMs). The framework integrates traveller attributes, departure time, transport mode, and semantic information from nearby points of interest (POIs) into a unified textual representation, incorporates transport domain knowledge through structured chain-of-thought (CoT) guidance, and adapts pretrained LLMs using low-rank adaptation (LoRA) fine-tuning. Experiments used 10,513 survey-based trip records from Guangzhou, China. Within the TripPurpose LLM framework, retaining the original POI names increased the accuracy of Qwen3-8B from 0.695 to 0.745 and its Macro-F1 from 0.610 to 0.681, with both metrics exceeding those of structured-feature machine-learning baselines and classifiers using term frequency–inverse document frequency (TF-IDF) features or fixed MacBERT embeddings. This finding highlights the value of contextual semantic modelling for trip purpose inference. Across ten LLM backbones, TripPurpose LLM combining LoRA fine-tuning with CoT guidance consistently achieved the strongest performance among the evaluated settings, with accuracy ranging from 0.71 to 0.76. This pattern demonstrates the framework's effectiveness across different model families and parameter scales. This study provides an integrative framework for inferring trip purposes from travel records, thereby supporting travel-demand analysis, transport planning, and policy evaluation.
Authors
- Xianlong Chen (ORCID: https://orcid.org/0000-0003-1670-5200)
- Chengzhi Zhang
- Zixuan Bai
- Xiaoyi Ma
- Zheng Gong
- Zhou Huang
- Shaoying Li
Institutions
- Peking University (CN)
- Guangzhou University (CN)
- Guangzhou Urban Planning Survey & Design Institute (CN)
- East China Normal University (CN)
Publication Details
- Journal
- Cities
- Published
- 2026-10-14
- DOI
- https://doi.org/10.1016/j.cities.2026.107680
- Primary Topic
- Transportation Planning and Optimization
- Type
- article
- Field-Weighted Citation Impact
- 0.00
Funders
- National Natural Science Foundation of China