Skip to content

WatchDog

WatchDog is an RL environment training AI oversight agents to detect errors in real-time.

Core trick

A GRPO-trained oversight agent flags dialogue turns with errors, while an adversarial mutator rewrites turns in a minimax loop against it.

Tags

Description

WatchDog is an RL environment training AI oversight agents to detect errors in real-time. It solves the gap where humans miss 60% of subtle AI hallucinations and logic flaws. This gym enables agents to make sequential decisions like passing or flagging turn-by-turn. The project uses the GRPO algorithm and LoRA adapters to remain fast and efficient. An adversarial arms race trains a detector and mutator via a minimax game for robustness. The system allows adding new domains like medical triage in just ten lines of code. Its reward structure penalizes false positives heavily to prevent hallucinated bugs. Training achieved a 15.4× accuracy jump and 5.7× recall increase in eighty minutes. The model shifted from indecision to making clear judgments on 77% of dialogue turns. Deployed on Hugging Face, WatchDog provides a production-grade gym for AI oversight.
RaghuHemadri/openenv_hack★ 22 forksPythonMITCreated Mar 7, 2026 · last push Mar 8, 2026

README excerpt

# OpenEnv Hack — WatchDog

**AI oversight training using [OpenEnv](https://github.com/meta-pytorch/OpenEnv) and multi-agent game plugins.**

## Presentation: [Link](https://docs.google.com/presentation/d/1zuvMWCRBVgK51ro7KKlH0Fu9q_Y4L84IlWYFl0KAMOw/edit?usp=sharing)

This repository contains the **WatchDog** RL environment for training AI agents to detect errors, lies, and misdirection in multi-agent conversations. Built for the OpenEnv hackathon.

## What's Inside

| Component | Description |
|-----------|-------------|
| **watchdog_env** | Core RL environment — server, client, plugins, training scripts |
| **watchdog_train_colab.ipynb** | Google Colab notebook for GRPO training (Qwen3-8B + LoRA) |
| **generate_case_study.py** | Produce markdown case studies from eval episodes |
| **generate_plots.py** | Parse training logs and generate evaluation plots |

## Quick Start

### 1. Clone and install

```bash
git clone https://github.com/RaghuHemadri/openenv_hack.git
cd openenv_hack
cp .env.example .env   # Edit with your GEMINI_API_KEY
pip install -e watchdog_env
pip install watchdog_env/requirements.txt
```

### 2. Run the server

```bash
cd watchdog_env
PYTHONPATH=. uvicorn server.app:app --host 0.0.0.0 --port 8000
```

### 3. Try the Gradio UI (optional)

```bash
cd watchdog_env
pip install gradio>=4.0.0
PYTHONPATH=. python -c "from server.ui import build_ui; build_ui().launch()"
```

### 4. Train in Colab

Open `watchdog_train_colab.ipynb` in Google Colab, enable GPU, and r

Team