ai-blackteam integrates 9 benchmark datasets (HarmBench, AdvBench, JailbreakBench, etc). You can add more by extending the DatasetLoader class.

How Dataset Loaders Work

Every dataset loader inherits from DatasetLoader and registers itself with @register_dataset. The base class handles caching - your loader just needs to implement download().

The DatasetLoader Base Class

Cache Location

Datasets cache to ~/.ai-blackteam/datasets/{name}.jsonl. Each line is a JSON object:
Once cached, datasets load instantly without network calls. Users can force re-download by deleting the cache file.

Required Dict Format

Each prompt dict must have:

Example: Loading from HuggingFace

Example: Loading from a URL

Using Your Dataset

Once registered, your dataset shows up in all dataset commands:

File Location

Place your loader in src/ai-blackteam/datasets/. Any .py file (not starting with _) is auto-discovered.