CoolFace
Apppublic

tahp0604/multi-agent-debate-defense

sourceHugging Facemitupdated 5mo agoView on Hugging Face
0likes
App README

DebateGuard: Adversarial RAG Defense

This Space hosts the DebateGuard RAG pipeline, which uses a two-stage adversarial defense to protect against Indirect Prompt Injection (IPI) attacks.

๐Ÿš€ Features

  • โ€”GPU-Accelerated Detection: Uses a fine-tuned Cross-Encoder on the Space's T4 GPU to scan documents in milliseconds.
  • โ€”Adversarial Debate: Flags suspicious chunks for a multi-agent debate (Prosecutor, Defender, Judge) powered by Groq.
  • โ€”S3 Integration: Automatically syncs documents from your AWS S3 bucket on startup.

๐Ÿ› ๏ธ Configuration

To run this Space, you must set the following Secrets in the HF Space settings:

SecretDescription
GROQ_API_KEYYour Groq API Key for the debate agents.
AWS_ACCESS_KEY_IDAWS Key for S3 document sync.
AWS_SECRET_ACCESS_KEYAWS Secret for S3 document sync.
AWS_S3_BUCKETThe name of your S3 bucket.
AWS_REGIONAWS region (e.g., us-east-1).

๐Ÿ“ฆ Local Usage

You can also run this locally on your PC by cloning the repo and installing the requirements:

bash
pip install -r requirements.txt
python flask_app/app.py

Ensure your .env file contains the keys listed above.