Agent4Rec: Revolutionizing Recommender Systems with Generative Agents
Agent4Rec introduces a revolutionary recommender system simulator that harnesses the capabilities of Large Language Models (LLMs) to create 1,000 generative agents. These agents, originating from the MovieLens-1M dataset, emulate genuine user interactions with movie recommendations, unveiling profound insights into human behavior within recommendation environments.
Key Features
- 1,000 LLM-Empowered Agents: Each agent embodies distinct social traits and preferences, mirroring real-world diversity.
- Realistic Interactions: Agents interact with personalized movie suggestions in a step-by-step manner.
- Diverse Actions: Simulated users can watch, rate, evaluate, exit, and even conduct interviews regarding recommended content.
- Flexible Configuration: Accommodates various recommender systems and simulation setups.
How It Works
Agent4Rec creates a dynamic environment where AI-driven agents engage with movie recommendations. This platform empowers researchers and developers to delve into the potential of LLM-enhanced generative agents in emulating authentic human behavior within recommendation scenarios.
Supported Recommender Systems
- Random: Randomly suggests items to users.
- Pop: Recommends popular items based on overall ratings.
- MF: Utilizes a pretrained Matrix Factorization model with BPR loss.
- MultVAE: Relies on a pretrained Variational Autoencoder for collaborative filtering.
- LightGCN: Harnesses a pretrained Graph Convolutional Network model.
Getting Started
Prerequisites
- Python 3.9.12 (Python 3.10+ may cause issues with the 'reckit' package)
- PyTorch 1.13.1+cu117
Installation
- Set up a virtual environment and manually install PyTorch.
- Install dependencies:
pip install -r requirements.txt
- Set up necessary environments:
python setup.py build_ext --inplace
Running a Simulation
- Export your OpenAI API key:
export OPENAI_API_KEY=your_api_key_here
- Run a quick start simulation:
python main.py
- For advanced configurations:
python main.py --simulation_name MyExp --modeltype MF --n_avatars 10 --max_pages 5 --items_per_page 4 --execution_mode parallel
Benefits and Applications
- Research Tool: Ideal for analyzing user behavior in recommendation systems.
- Algorithm Testing: Evaluate and enhance recommendation algorithms using lifelike user simulations.
- User Experience Optimization: Obtain insights to enhance recommendation interfaces and strategies.
- Scalable Testing: Simulate extensive user interactions without the necessity for real user studies.
Conclusion
Agent4Rec paves the way for comprehending and refining recommender systems. By simulating genuine user interactions at a large scale, it delivers valuable insights that can revolutionize the effectiveness, personalization, and engagement of recommendation experiences in real-world scenarios.