SafetyBench
BenchmarkFree11K safety evaluation questions across 7 categories.
Capabilities6 decomposed
multilingual safety evaluation dataset with category-stratified sampling
Medium confidenceProvides 11,435 multiple-choice questions across 7 safety categories in parallel Chinese and English versions, with structured JSON schema (id, category, question, options array, answer index) enabling systematic evaluation of LLM safety alignment. Dataset includes full test sets (test_en.json, test_zh.json) and category-balanced few-shot examples (dev_en.json, dev_zh.json with 5 examples per category) for both zero-shot and few-shot evaluation protocols.
Provides parallel Chinese-English safety evaluation with 7-category stratification and category-balanced few-shot examples (5 per category), enabling contrastive safety analysis across languages and fine-grained failure mode diagnosis. Most safety benchmarks (e.g., TruthfulQA, HarmBench) focus on English only or lack structured category decomposition.
Uniquely covers both Chinese and English with identical category structure, enabling cross-lingual safety parity validation that general-purpose benchmarks like MMLU cannot provide; category-stratified design reveals which safety domains models struggle with rather than aggregate safety scores.
zero-shot and few-shot evaluation protocol with prompt templating
Medium confidenceImplements dual evaluation modes where zero-shot presents questions directly without context, while five-shot provides 5 category-matched examples before each test question. System uses configurable prompt templates that can be adapted per-model (as shown in evaluate_baichuan.py) to optimize answer extraction from model outputs, supporting both structured and free-form response parsing.
Provides model-agnostic evaluation framework with configurable prompt templates (as evidenced by evaluate_baichuan.py supporting Baichuan-specific formatting) and explicit support for both zero-shot and five-shot modes with category-balanced examples, enabling systematic study of in-context learning effects on safety.
Differs from static benchmarks like MMLU by supporting prompt customization per model and explicit few-shot/zero-shot comparison; more flexible than closed-source evaluation APIs (e.g., OpenAI Evals) by providing full control over prompt templates and answer extraction logic.
category-stratified safety metric aggregation and leaderboard submission
Medium confidenceAggregates model predictions into per-category accuracy scores across 7 safety domains, enabling fine-grained safety failure analysis beyond aggregate metrics. Leaderboard submission accepts UTF-8 JSON files mapping question IDs to predicted answer indices, with backend validation and ranking against baseline models. Architecture supports both English and Chinese evaluation tracks with separate leaderboards.
Implements 7-category stratified metric aggregation enabling fine-grained safety diagnosis, with official leaderboard integration supporting both English and Chinese evaluation tracks. Most safety benchmarks (TruthfulQA, HarmBench) report only aggregate scores without category-level breakdown.
Category-stratified metrics reveal which safety domains models struggle with, enabling targeted safety improvements; leaderboard integration provides peer comparison and publication venue unlike standalone evaluation scripts.
hugging face dataset integration with dual download methods
Medium confidenceProvides two data acquisition paths: shell script (download_data.sh) using curl/wget for direct Hugging Face download, and Python method (download_data.py) using the Hugging Face datasets library for programmatic access. Both methods download 6 JSON files (test_en.json, test_zh.json, test_zh_subset.json, dev_en.json, dev_zh.json) into a local data directory, with automatic decompression and validation.
Provides dual download paths (shell script and Python) enabling flexibility for different deployment contexts (CI/CD pipelines vs. interactive development), with Hugging Face integration for version management and caching. Most benchmarks provide only single download method or require manual GitHub cloning.
Dual-method approach supports both infrastructure automation (shell) and Python integration without forcing dependency on datasets library; Hugging Face hosting enables automatic versioning and CDN distribution vs. GitHub raw file downloads.
chinese-english parallel dataset with sensitive keyword filtering
Medium confidenceMaintains three parallel test datasets: full English (test_en.json), full Chinese (test_zh.json), and filtered Chinese subset (test_zh_subset.json with 300 questions per category, filtered for sensitive keywords). Each question maintains identical structure and category mapping across languages, enabling direct cross-lingual comparison while test_zh_subset provides a safer evaluation option for sensitive deployment contexts.
Provides true parallel Chinese-English safety evaluation with identical category structure and question mapping, plus a filtered Chinese subset for regulated environments. Most safety benchmarks (TruthfulQA, HarmBench) are English-only; MMLU-Pro has Chinese but lacks safety focus and category stratification.
Enables direct cross-lingual safety comparison on identical questions unlike separate English/Chinese benchmarks; filtered subset provides regulatory-compliant evaluation option unavailable in other multilingual safety benchmarks.
7-category safety taxonomy with fine-grained failure mode classification
Medium confidenceOrganizes 11,435 questions into 7 distinct safety categories (specific categories not detailed in provided docs but implied by category field in JSON schema), enabling systematic analysis of which safety domains models fail in. Each question is tagged with a category label, allowing per-category accuracy computation and identification of domain-specific alignment gaps. Category-balanced few-shot examples (5 per category) support category-specific evaluation.
Implements 7-category safety taxonomy with category-balanced few-shot examples enabling systematic failure mode diagnosis. Most safety benchmarks (TruthfulQA, HarmBench) report only aggregate safety scores without category-level breakdown or category-specific few-shot examples.
Category stratification reveals which safety domains models struggle with, enabling targeted improvements; category-balanced few-shot examples support category-specific evaluation unlike benchmarks with random few-shot sampling.
Capabilities are decomposed by AI analysis. Each maps to specific user intents and improves with match feedback.
Related Artifactssharing capabilities
Artifacts that share capabilities with SafetyBench, ranked by overlap. Discovered automatically through the match graph.
SafetyBench Eval
11K safety evaluation questions across 7 categories.
WildGuard
Allen AI's safety classification dataset and model.
Llama Guard 3 8B
Llama Guard 3 is a Llama-3.1-8B pretrained model, fine-tuned for content safety classification. Similar to previous versions, it can be used to classify content in both LLM inputs (prompt classification)...
OpenAssistant Conversations (OASST)
161K human-written messages in 35 languages with quality ratings.
ShieldGemma
Google's safety content classifiers built on Gemma.
Llama Guard
Meta's LLM safety classifier for content policy enforcement.
Best For
- ✓LLM safety researchers benchmarking alignment across model families
- ✓Teams evaluating Chinese-language LLMs where safety is critical (finance, healthcare, government)
- ✓Organizations building multilingual AI systems requiring parity safety validation
- ✓Academic researchers studying cross-lingual safety generalization
- ✓Researchers studying in-context learning effects on safety alignment
- ✓Teams evaluating models with non-standard output formats requiring custom prompt engineering
- ✓Organizations benchmarking models across different prompt sensitivity profiles
- ✓Safety auditors detecting prompt-injection vulnerabilities through evaluation-setting variance
Known Limitations
- ⚠Multiple-choice format may not capture nuanced safety failures in open-ended generation
- ⚠11,435 questions is smaller than some general-purpose benchmarks (MMLU has 15,000+), potentially missing long-tail safety edge cases
- ⚠Dataset is static — does not adapt to emerging safety concerns or adversarial techniques discovered post-publication
- ⚠Chinese subset (test_zh_subset.json) is filtered for sensitive keywords, potentially biasing evaluation toward detectable rather than subtle safety violations
- ⚠Five-shot examples are fixed per category — does not support dynamic example selection based on model performance or adversarial difficulty
- ⚠Prompt templates require manual tuning per model family; no automated prompt optimization framework provided
Requirements
Input / Output
UnfragileRank
UnfragileRank is computed from adoption signals, documentation quality, ecosystem connectivity, match graph feedback, and freshness. No artifact can pay for a higher rank.
About
Comprehensive safety evaluation benchmark for LLMs covering 11,435 multiple-choice questions across 7 safety categories in both Chinese and English, measuring model safety with fine-grained category analysis.
Categories
Alternatives to SafetyBench
Open-source image generation — SD3, SDXL, massive ecosystem of LoRAs, ControlNets, runs locally.
Compare →Are you the builder of SafetyBench?
Claim this artifact to get a verified badge, access match analytics, see which intents users search for, and manage your listing.
Get the weekly brief
New tools, rising stars, and what's actually worth your time. No spam.
Data Sources
Looking for something else?
Search →