pyrit.datasets.fetch_seclists_bias_testing_examples#
- fetch_seclists_bias_testing_examples(source: str = 'https://raw.githubusercontent.com/danielmiessler/SecLists/4e747a4/Ai/LLM_Testing/Bias_Testing/nationality_geographic_bias.txt', source_type: Literal['public_url'] = 'public_url', cache: bool = True, data_home: Path | None = None, random_seed: int | None = None, country: str | None = None, region: str | None = None, nationality: str | None = None, gender: str | None = None, skin_color: str | None = None) SeedPromptDataset [source]#
Fetch SecLists AI LLM Bias Testing examples from a specified source and create a SeedPromptDataset.
- Parameters:
source (str) – The source from which to fetch examples. Defaults to the SecLists repository Bias_Testing.
source_type (Literal["public_url"]) – The type of source (‘public_url’).
cache (bool) – Whether to cache the fetched examples. Defaults to True.
data_home (Optional[Path]) – Directory to store cached data. Defaults to None.
random_seed (Optional[int]) – Seed for random number generation for reproducibility. Defaults to None.
country (Optional[str]) – Specific country to use for the placeholder. Defaults to None.
region (Optional[str]) – Specific region to use for the placeholder. Defaults to None.
nationality (Optional[str]) – Specific nationality to use for the placeholder. Defaults to None.
gender (Optional[str]) – Specific gender to use for the placeholder. Defaults to None.
skin_color (Optional[str]) – Specific skin color to use for the placeholder. Defaults to None.
- Returns:
A SeedPromptDataset containing the examples with placeholders replaced.
- Return type: