pyrit.datasets.fetch_aya_redteaming_dataset#
- fetch_aya_redteaming_dataset(cache: bool = True, data_home: Path | None = None, language: Literal['English', 'Hindi', 'French', 'Spanish', 'Arabic', 'Russian', 'Serbian', 'Tagalog'] = 'English', harm_categories: List[Literal['Bullying & Harassment', 'Discrimination & Injustice', 'Graphic material', 'Harms of Representation Allocation and Quality of Service', 'Hate Speech', 'Non-consensual sexual content', 'Profanity', 'Self-Harm', 'Violence, Threats & Incitement']] | None = None, harm_scope: Literal['global', 'local'] | None = None) SeedPromptDataset [source]#
Fetch examples from the Aya Red-teaming dataset with optional filtering and create a SeedPromptDataset.
- Parameters:
cache (bool) – Whether to cache the fetched examples. Defaults to True.
data_home – Directory to store cached data. Defaults to None.
language – The language to fetch prompts for. Defaults to “English”.
harm_categories – List of harm categories to filter the examples. Defaults to None, which means all categories are included. Otherwise, only prompts with at least one matching category are included.
harm_scope – Whether to fetch globally or locally harmful prompts. Defaults to None, which means all examples are included.
- Returns:
A SeedPromptDataset containing the filtered examples.
- Return type:
Note
For more information and access to the original dataset and related materials, visit: https://huggingface.co/datasets/CohereForAI/aya_redteaming/blob/main/README.md
Related paper: https://arxiv.org/abs/2406.18682
The dataset license: Apache 2.0
Warning
Due to the nature of these prompts, it may be advisable to consult your relevant legal department before testing them with LLMs to ensure compliance and reduce potential risks.