multilingual safety evaluation dataset with category-stratified sampling
Provides 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.
Unique: 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.
vs alternatives: 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
Implements 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.
Unique: 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.
vs alternatives: 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
Aggregates 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.
Unique: 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.
vs alternatives: 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
Provides 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.
Unique: 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.
vs alternatives: 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
Maintains 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.
Unique: 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.
vs alternatives: 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
Organizes 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.
Unique: 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.
vs alternatives: 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.