This repository is the implemetation of LLMob from Large Language Models as Urban Residents: An LLM Agent Framework for Personal Mobility Generation. LLMob is a simple framework that takes advantage of Large Language Models (LLMs) for personal activity trajectory generation.
Figure 1: The LLMob Framework Architecture.
Figure 2: Illustration of activity trajectory generated by LLM agent.
- ./simulator/engine/person.py: Generate personal activity trajectory according to real-world check-in data.
- ./simulator/engine/functions/traj_infer.py: Personal activity trajectory generation function.
- ./simulator/engine/functions/PISC.py: Personal activity pattern identification function.
- ./simulator/engine/memory/retrieval_helper.py: Function related to motivation retrieval.
- ./simulator/prompt_template: Prompt template used in this project.
To get started with LLMob, follow these steps:
https://github.com/Wangjw6/LLMob.git
cd LLMob
conda env create -f environment.yml
conda activate llm
cd simulator/engine/
python person.py
If you would like to cite our code or paper, please use:
@article{wang2024large,
title={Large Language Models as Urban Residents: An LLM Agent Framework for Personal Mobility Generation},
author={Wang, Jiawei and Jiang, Renhe and Yang, Chuang and Wu, Zengqing and Onizuka, Makoto and Shibasaki, Ryosuke and Xiao, Chuan},
journal={arXiv preprint arXiv:2402.14744},
year={2024}
}
This project refers to several open-source ChatGPT application:
The raw data used in this project is from Foursquare API.