test / README.md
israel's picture
Cleaned AfriGuard: drop original labels/match cols, add scenario, figures, citation
0340023 verified
|
Raw History Blame Contribute Delete
5.78 kB
metadata
license: cc-by-4.0
language:
  - am
  - ha
  - ig
  - om
  - sn
  - sw
  - tw
  - wo
  - yo
  - zu
task_categories:
  - text-classification
tags:
  - safety
  - llm-safety
  - african-languages
  - red-teaming
pretty_name: AfriGuard
size_categories:
  - 10K<n<100K
configs:
  - config_name: amharic
    data_files:
      - split: train
        path: amharic/train.csv
      - split: validation
        path: amharic/val.csv
      - split: test
        path: amharic/test.csv
  - config_name: hausa
    data_files:
      - split: train
        path: hausa/train.csv
      - split: validation
        path: hausa/val.csv
      - split: test
        path: hausa/test.csv
  - config_name: igbo
    data_files:
      - split: train
        path: igbo/train.csv
      - split: validation
        path: igbo/val.csv
      - split: test
        path: igbo/test.csv
  - config_name: oromo
    data_files:
      - split: train
        path: oromo/train.csv
      - split: validation
        path: oromo/val.csv
      - split: test
        path: oromo/test.csv
  - config_name: shona
    data_files:
      - split: train
        path: shona/train.csv
      - split: validation
        path: shona/val.csv
      - split: test
        path: shona/test.csv
  - config_name: swahili
    data_files:
      - split: train
        path: swahili/train.csv
      - split: validation
        path: swahili/val.csv
      - split: test
        path: swahili/test.csv
  - config_name: twi
    data_files:
      - split: train
        path: twi/train.csv
      - split: validation
        path: twi/val.csv
      - split: test
        path: twi/test.csv
  - config_name: wolof
    data_files:
      - split: train
        path: wolof/train.csv
      - split: validation
        path: wolof/val.csv
      - split: test
        path: wolof/test.csv
  - config_name: yoruba
    data_files:
      - split: train
        path: yoruba/train.csv
      - split: validation
        path: yoruba/val.csv
      - split: test
        path: yoruba/test.csv
  - config_name: zulu
    data_files:
      - split: train
        path: zulu/train.csv
      - split: validation
        path: zulu/val.csv
      - split: test
        path: zulu/test.csv

AfriGuard: Safety Evaluation Data for African Languages

AfriGuard is a human-annotated safety dataset covering 10 African languages: Amharic, Hausa, Igbo, Oromo, Shona, Swahili, Twi, Wolof, Yoruba, and Zulu. Each example contains a culturally grounded scenario and prompt/response pair in English and the target language, labeled with majority-vote annotations (safety category and safe/unsafe) from three native-speaker annotators.

AfriGuard overview

Paper: AfriGuard: Safety and Robust Refusal For African Languages

Pipeline

AfriGuard pipeline

Splits

Each language config provides three splits:

Split Size (per language) Description
train ~950–980 rows 50% of scenario-level data
validation 20 rows Few-shot pool: 10 categories × {safe, unsafe}. The first 10 rows cover all 10 classes (5 safe / 5 unsafe); rows 11–20 cover all 10 classes with the opposite label.
test ~980–1000 rows 50% of scenario-level data. 100% of test scenario_ids are unseen in train.

Split properties:

  • Train/test split at the scenario level: every test scenario is fully unseen in train.
  • Scenarios are shared across languages of the same region (Amharic+Oromo share ET scenarios; Hausa+Igbo+Yoruba share NG scenarios). Scenario assignment is made globally per language group, so there is no cross-language train/test leakage.

Categories

  1. Criminal Activity & Exploitation
  2. Political & Societal Manipulation
  3. Violence & Physical Harm
  4. Systemic Risks
  5. Sexual & Exploitative Content
  6. Unsafe or High-Risk Advice
  7. Privacy & Data Misuse
  8. Hate, Harassment & Discrimination
  9. Ethical & Moral Risk
  10. Intellectual Property & Content Integrity

Fields

All language configs share the same schema:

Column Description
id Unique example id
scenario_id Scenario grouping id
scenario Full scenario description (context, severity levels, example prompts, AI safety application)
country Country context of the scenario
target_language Target language code
prompt / response English prompt and model response
prompt_translated / response_translated Final human-verified translations
majority_vote_class Majority-vote safety category from 3 annotators
majority_vote_safe_unsafe Majority-vote safe/unsafe label from 3 annotators

Usage

from datasets import load_dataset

ds = load_dataset("israel/AfriGuard", "amharic")
train, val, test = ds["train"], ds["validation"], ds["test"]

# Few-shot: the first 10 validation rows cover all 10 categories (5 safe / 5 unsafe)
fewshot_10 = val.select(range(10))

Citation

@misc{azime2026afriguardsafetyrobustrefusal,
      title={AfriGuard: Safety and Robust Refusal For African Languages}, 
      author={Israel Abebe Azime and Jesujoba O. Alabi and Iffat Maab and Alexander D. Cai and Tadesse Destaw Belay and Atnafu Lambebo Tonja and Jonas Kgomo and Folasade Alabi and Salomey Osei and Saminu Muhammad Aliyu and Nkechinyere Faith Aguobi and Bontu Fufa Balcha and Blessing Sibanda and Davis David and Mouhamadane Mboup and Daud Abolade and Neo Putini and Louis Powell and Kiant'e Brantley and Philipp Slusallek and Dietrich Klakow and Julia Kreutzer},
      year={2026},
      eprint={2610.26474},
      archivePrefix={arXiv},
      primaryClass={cs.CL},
      url={https://arxiv.org/abs/2610.26474}, 
}