pyrit.datasets.fetch_adv_bench_dataset

pyrit.datasets.fetch_adv_bench_dataset#

fetch_adv_bench_dataset(source: str = 'https://raw.githubusercontent.com/llm-attacks/llm-attacks/main/data/advbench/harmful_behaviors.csv', source_type: Literal['public_url'] = 'public_url', cache: bool = True, data_home: Path | None = None) SeedPromptDataset[source]#

Fetch AdvBench examples and create a SeedPromptDataset.

Parameters:
  • source (str) – The source from which to fetch examples. Defaults to the AdvBench repository.

  • 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.

Returns:

A SeedPromptDataset containing the examples.

Return type:

SeedPromptDataset

Note

For more information and access to the original dataset and related materials, visit: llm-attacks/llm-attacks. Based on research in paper: https://arxiv.org/abs/2307.15043 written by Andy Zou, Zifan Wang, Nicholas Carlini, Milad Nasr, J. Zico Kolter, Matt Fredrikson