platform-war-public  by LYiHub

GraphRAG framework for multi-agent debate from social media

created 7 months ago
778 stars

Top 45.8% on sourcepulse

GitHubView on GitHub
Project Summary

This project provides a multi-agent chatbot framework that leverages GraphRAG to simulate debates between AI agents representing different social media platforms. It extracts user comments from social platforms, builds a knowledge graph, and enables agents to debate topics using platform-specific viewpoints and language. The target audience includes researchers and developers interested in LLM-based debate simulation and knowledge graph integration.

How It Works

The framework combines a knowledge graph with Retrieval-Augmented Generation (RAG). User comments are processed to extract entities and relationships, forming a knowledge graph database. This graph is then used by a retriever to fetch relevant information, which augments the prompts for LLM agents. Agents are designed to emulate distinct platform perspectives, facilitating debates on specified topics.

Quick Start & Requirements

  • Install:
    • Create conda environment: conda create -n platform_war python=3.11.7
    • Activate environment: conda activate platform_war
    • Install PyTorch with CUDA 12.1: conda install pytorch==2.1.2 torchvision==0.16.2 torchaudio==2.1.2 pytorch-cuda=12.1 -c pytorch -c nvidia
    • Install FAISS GPU version: conda install -c conda-forge faiss-gpu
    • Install dependencies: pip install -r requirements.txt
  • Prerequisites: Python 3.11.7, CUDA 12.1 (for GPU acceleration), PyTorch 2.1.2, FAISS GPU, and an API key for the Moonshot-v1 model (or other compatible LLM).
  • Configuration: Requires filling in an API key in config.py. For CPU-only operation, modify embedding_model.py to use "device": "cpu".
  • Data: Requires result.json in a specific format for knowledge graph extraction. Pre-extracted knowledge bases for Bilibili, Weibo, and Zhihu are available via Baidu Netdisk and Google Drive.
  • Run: python platform_war.py
  • Docs: Microsoft GraphRAG (referenced as a similar project)

Highlighted Details

  • Utilizes a knowledge graph for RAG to enhance LLM agent responses.
  • Agents are designed to mimic distinct platform-specific viewpoints and communication styles.
  • Supports GPU acceleration via FAISS-GPU, requiring specific CUDA and PyTorch versions.
  • Includes tools for knowledge graph extraction from JSON data and visualization.

Maintenance & Community

No specific contributors, sponsorships, or community links (Discord/Slack) are mentioned in the README.

Licensing & Compatibility

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

Limitations & Caveats

The UI has known display issues with adaptive sizing and conversation overlap when exceeding screen height. The project is primarily designed for Windows/Linux systems due to FAISS-GPU's CUDA dependency.

Health Check
Last commit

7 months ago

Responsiveness

Inactive

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

Explore Similar Projects

Feedback? Help us improve.