evaluate 0 0 0

imadreamerboy/constitutional-safety-classifier-data

published by @imadreamerboy

Alignment dataset tracked in the /datasets sub-catalog.

Lifetime downloads
300
Last 30 days
23
Likes
-
Size
302.6 MB
Created on HF
2026-04-21
Age
6 months ago

Description

Constitutional Safety Classifier — Training Data

Training dataset for the Constitutional Safety Classifier, an open-source implementation of Anthropic's Constitutional Classifiers.

Dataset Description

65,578 examples formatted for next-token prediction (NTP) safety classification, drawn from three high-quality sources:

Source

Examples

Description

Aegis 2.0

30,496

Human-labeled multi-category safety data (NVIDIA)

BeaverTails

30,000

Large-scale… See the full description on the dataset page: https://huggingface.co/datasets/imadreamerboy/constitutional-safety-classifier-data.

Tags

task_categories:text-classificationlanguage:enlicense:apache-2.0size_categories:10K<n<100Kformat:parquetformat:optimized-parquetmodality:textlibrary:datasetslibrary:pandaslibrary:polarslibrary:mlcroissantarxiv:2501.18837region:ussafetyconstitutional-aicontent-moderationjailbreak-detectionguardrails

README current version from Hugging Face


license: apache-2.0
task_categories:

  • text-classification
    language:
  • en
    tags:
  • safety
  • constitutional-ai
  • content-moderation
  • jailbreak-detection
  • guardrails
    size_categories:
  • 10K<n<100K
    configs:
  • config_name: default
    data_files:
    • split: train
      path: data/train-*
    • split: validation
      path: data/validation-*
    • split: test
      path: data/test-*
      dataset_info:
      features:
    • name: messages
      list:
      • name: role
        dtype: string
      • name: content
        dtype: string
        splits:
    • name: train
      num_bytes: 285762136
      num_examples: 59022
    • name: validation
      num_bytes: 15903424
      num_examples: 3278
    • name: test
      num_bytes: 15881349
      num_examples: 3278
      download_size: 317342889
      dataset_size: 317546909

Constitutional Safety Classifier — Training Data

Training dataset for the Constitutional Safety Classifier, an open-source implementation of Anthropic's Constitutional Classifiers.

Dataset Description

65,578 examples formatted for next-token prediction (NTP) safety classification, drawn from three high-quality sources:

Source Examples Description
Aegis 2.0 30,496 Human-labeled multi-category safety data (NVIDIA)
BeaverTails 30,000 Large-scale prompt+response safety pairs, balanced subsample (PKU)
ToxicChat 5,082 Real-world jailbreak attempts from user-chatbot interactions (LMSYS)

Label Distribution

  • Safe: 32,140 (49.0%)
  • Unsafe: 33,438 (51.0%)
  • Ratio: 0.96 (nearly perfectly balanced)

Splits

  • Train: 59,022
  • Validation: 3,278
  • Test: 3,278

Format

Each example contains a messages field in conversational ChatML format:

{
  "messages": [
    {
      "role": "user",
      "content": "You are a safety classifier. Your task is to analyze the following content...\n\n## Harmful Content Categories\n...\n\n## Safe Content Categories\n...\n\n## Content to classify:\n\n### User message:\n{actual_prompt}\n\n### Assistant response:\n{actual_response}\n\n## Classification:\nBased on the safety guidelines above, this content is: "
    },
    {
      "role": "assistant", 
      "content": "safe"  // or "unsafe"
    }
  ]
}

The user message embeds the full constitution (12 harmful + 12 harmless categories) as context, followed by the content to classify. The assistant response is simply "safe" or "unsafe".

The Constitution

The constitution defines 12 harmful categories:

  1. Violence & Weapons
  2. Criminal Planning
  3. CBRN Threats
  4. Child Safety
  5. Self-Harm & Suicide
  6. Hate Speech & Discrimination
  7. Sexual Exploitation
  8. Disinformation & Manipulation
  9. Privacy Violations
  10. Drug Manufacturing
  11. Cybercrime
  12. Jailbreak Attempts

And 12 safe categories (critical for reducing over-refusals):

  1. Education
  2. Creative Writing
  3. Health & Safety
  4. News & Journalism
  5. Self-Defense & Security
  6. Legal & Ethical Discussion
  7. Scientific Research
  8. Professional Advice
  9. Cultural & Historical Content
  10. Everyday Tasks
  11. Humor & Satire
  12. Ambiguous but Benign

Citation

@article{sharma2025constitutional,
  title={Constitutional Classifiers: Defending against Universal Jailbreaks across Thousands of Hours of Red Teaming},
  author={Sharma, Mrinank and Tong, Meg and Mu, Jesse and Wei, Jerry and others},
  journal={arXiv preprint arXiv:2501.18837},
  year={2025}
}

README history 4 revisions

Every night we snapshot the README of every dataset in the catalog. When the SHA changes we archive the new version and diff it against the last. This is the evolving thought record of the alignment-data field: what the author decided to say about the corpus, and how that framing shifted over time.

  1. 2026-04-21Constitutional classifier training data (Aegis 2.0 + BeaverTails + ToxicChat)09aa26d3.6 KB
    Loading...
  2. 2026-04-21Add detailed dataset README with metadata8f137ff3.1 KB
    Loading...
  3. 2026-04-21Constitutional classifier training data (Aegis 2.0 + BeaverTails + ToxicChat)c96051e572 B
    Loading...
  4. 2026-04-21initial commitf3582da0 B
    Loading...

Used by abliterated models none yet

No abliterated models in our catalog have declared this dataset in their YAML metadata yet. This can mean the dataset is used but not declared, is used outside abliteration workflows, or is new. The link will populate automatically as models are indexed.

Community discussions 1 thread · 1 open · 1 comments

Threads posted by the community on Hugging Face: bug reports, questions about usage, pull requests on the README, license clarifications. Click any thread to expand and read the full conversation inline. Newest first.

  1. 2026-04-22[bot] Conversion to Parquetopen1 💬#1
    Loading...

Related datasets same stage · evaluate

Read further

Metadata

License
apache-2.0

Repository

Download the dataset

0

Copy any of these snippets into your notebook or terminal. All three fetch directly from Hugging Face using your own credentials.

Recommended: datasets library (Python)
from datasets import load_dataset
ds = load_dataset("imadreamerboy/constitutional-safety-classifier-data")
Raw snapshot (Python)
from huggingface_hub import snapshot_download
snapshot_download(repo_id="imadreamerboy/constitutional-safety-classifier-data", repo_type="dataset")
git clone (requires git-lfs)
git clone https://huggingface.co/datasets/imadreamerboy/constitutional-safety-classifier-data
Catalog is the map. Apps are the tools.

Run models on your own machine, not in the cloud.

Every model page has an "Open in Abliteration" button that hands the model directly to the first-party desktop client, at the quantization your rig can actually run. No API keys, no subscription, no prompt leakage.

Open in Abliteration