Agent4Rec

[SIGIR 2024 perspective] The implementation of paper "On Generative Agents in Recommendation"

open-sourceagent-frameworks
473
Stars
+8
Stars/month
0
Releases (6m)

Star Growth

463473482Mar 27Apr 1

Overview

Agent4Rec是一个创新的推荐系统模拟器,采用1,000个基于大语言模型的生成式智能体来模拟真实用户行为。该工具基于SIGIR 2024论文实现,使用MovieLens-1M数据集初始化智能体,每个智能体都具有不同的社交特征和偏好。这些智能体能够与个性化电影推荐进行逐页交互,执行观看、评分、评估、退出和访谈等多种行为。Agent4Rec旨在探索大语言模型驱动的生成式智能体在推荐环境中模拟真实独立用户行为的潜力。该工具为推荐系统研究提供了一个大规模、可控的实验环境,使研究人员能够在安全的沙盒环境中测试各种推荐算法和策略,而无需真实用户参与。通过模拟真实用户的复杂行为模式,研究人员可以深入理解推荐系统的效果,发现潜在问题,并优化推荐策略。

Deep Analysis

Key Differentiator

vs traditional RecSys evaluation: 1000 LLM-empowered agents with diverse personality traits simulate authentic human behavior — bridges generative AI and recommendation science for behavioral studies (SIGIR 2024)

Capabilities

  • Recommender system simulator with 1000 LLM-powered generative agents
  • Agents with varied social traits and preferences from MovieLens-1M
  • Simulation of watching, rating, evaluating, and exit behaviors
  • Support for multiple recommender backends (Random, Popularity, MF, MultVAE, LightGCN)
  • Sequential and parallel execution modes

🔗 Integrations

OpenAI ChatGPT-3.5PyTorchMovieLens-1M dataset

Best For

  • Academic research on agent-based recommendation systems
  • Evaluating recommender algorithms against simulated user behavior
  • SIGIR/RecSys research on LLM-emulated user preferences

Not Ideal For

  • Production recommendation deployment
  • Real-time user interaction systems
  • Non-movie domain recommendations without retraining

Languages

Python

Deployment

local CLI execution

Known Limitations

  • Python 3.10+ may cause reckit compatibility issues
  • Movie-domain only (MovieLens-1M initialized)
  • API costs scale with agent count and browsing depth
  • Research tool — not production recommendation engine

Pros

  • + 大规模仿真能力:支持1,000个并发LLM驱动的智能体同时运行,提供真实的用户行为模拟
  • + 基于真实数据:使用MovieLens-1M数据集初始化智能体,确保模拟行为的真实性和可信度
  • + 学术研究价值:基于SIGIR 2024发表论文,为推荐系统研究提供了经过同行评议的理论基础

Cons

  • - 计算成本高昂:需要OpenAI API密钥,大规模仿真会产生显著的API调用费用
  • - 环境要求严格:仅支持Python 3.9.12和特定PyTorch版本,兼容性有限
  • - 主要面向研究:工具设计偏向学术研究,商业应用场景相对有限

Use Cases

  • 推荐算法研究:测试和比较不同推荐策略在模拟用户群体中的表现效果
  • 用户行为分析:研究用户与推荐系统交互的行为模式和偏好变化趋势
  • 推荐系统优化:在大规模用户模拟环境中发现和解决推荐系统的潜在问题

Getting Started

1. 安装依赖:在虚拟环境中手动安装PyTorch,然后运行pip install -r requirements.txt;2. 环境配置:在recommenders/目录下运行python setup.py build_ext --inplace设置加速工具;3. 开始仿真:导出OpenAI API密钥并运行python main.py启动3个智能体的演示仿真

Compare Agent4Rec