Agent4Rec  by LehengTHU

Recommender system simulator using generative agents

created 1 year ago
387 stars

Top 75.2% on sourcepulse

GitHubView on GitHub
1 Expert Loves This Project
Project Summary

Agent4Rec is a recommender system simulator designed to explore the behavior of LLM-powered generative agents in realistic user interaction scenarios. It allows researchers and developers to simulate up to 1,000 agents, each initialized with traits from the MovieLens-1M dataset, to study how these agents interact with personalized recommendations through actions like watching, rating, and evaluating items.

How It Works

The simulator leverages Large Language Models (LLMs) to create sophisticated, human-like agents. These agents are initialized with diverse social traits and preferences derived from a dataset. They then engage with a sequence of personalized recommendations, making decisions and performing actions within a simulated environment. This approach aims to provide a more nuanced understanding of user behavior in recommendation systems compared to traditional methods.

Quick Start & Requirements

  • Install: pip install -r requirements.txt
  • Prerequisites: Python 3.9.12, PyTorch 1.13.1+cu117. Python versions over 3.10 may cause issues with the 'reckit' package. Requires an OpenAI API key.
  • Setup: Run python setup.py build_ext --inplace in the recommenders/ directory.
  • Demo: python main.py (3-minute toy simulation with 3 agents).
  • Docs: MovieLens-1M dataset

Highlighted Details

  • Supports multiple recommender models: Random, Pop, MF, MultVAE, LightGCN.
  • Configurable simulation parameters: number of agents, pages browsed, items per page.
  • Parallel execution mode for faster simulations.
  • Simulation costs estimated at $0.016 per user for ChatGPT-3.5.

Maintenance & Community

The project is associated with SIGIR 2024. Further community or maintenance details are not specified in the README.

Licensing & Compatibility

The README does not explicitly state the license. Compatibility for commercial use or closed-source linking is not specified.

Limitations & Caveats

The project is tested on specific older versions of Python and PyTorch, with potential compatibility issues for newer Python versions. The reliance on OpenAI's API means costs are incurred, and availability is dependent on the external service.

Health Check
Last commit

1 year ago

Responsiveness

Inactive

Pull Requests (30d)
0
Issues (30d)
0
Star History
36 stars in the last 90 days

Explore Similar Projects

Feedback? Help us improve.