Skip to content
/ LLMob Public

LLMob is an intuitive framework that builds reasoning logic for LLMs in the context of personal activity trajectory generation.

Notifications You must be signed in to change notification settings

Wangjw6/LLMob

Repository files navigation

Code License

(NeurIPS' 24) Large Language Models as Urban Residents: An LLM Agent Framework for Personal Mobility Generation

📖 Description

Welcome to the official implementation of LLMob, as described in our paper Large Language Models as Urban Residents: An LLM Agent Framework for Personal Mobility Generation. This project demonstrates how Large Language Models (LLMs) can be leveraged to generate personal mobility trajectories based on real-world data.

LLMob is an intuitive framework that builds reasoning logic for LLMs in the context of personal activity trajectory generation.


Figure 1: The LLMob Framework Architecture.


Figure 2: Illustration of activity trajectory generated by LLM agent.

⭐ Key Components

  • ./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.

⚙️ Usage

To get started with LLMob, follow these steps:

git clone https://github.com/Wangjw6/LLMob.git
cd LLMob
conda env create -f environment.yml
conda activate llm
python run_anonymized.py 

You should also add your own OpenAI API key in the ./config/key.yaml file.

📚 BibTex Citation

If you would like to cite our work, 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 Koshizuka, Noboru and Xiao, Chuan},
  journal={arXiv preprint arXiv:2402.14744},
  year={2024}
}

🌷 Acknowledgments

Our implementation adapts several open-source ChatGPT application and have extensively modified it to our purposes. We thank the authors for sharing their implementations and related resources:

The raw data used in this project is from Foursquare API. We select the data with enough records and preprocess them before using in our project.

About

LLMob is an intuitive framework that builds reasoning logic for LLMs in the context of personal activity trajectory generation.

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages