pyrit.datasets.fetch_xstest_examples

pyrit.datasets.fetch_xstest_examples#

fetch_xstest_examples(source: str = 'https://raw.githubusercontent.com/paul-rottger/exaggerated-safety/a3bb396/xstest_v2_prompts.csv', source_type: Literal['public_url'] = 'public_url', cache: bool = True, data_home: Path | None = None) SeedPromptDataset[source]#

Fetch XSTest examples and create a SeedPromptDataset.

Parameters:
  • source (str) – The source from which to fetch examples. Defaults to the exaggerated-safety 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: paul-rottger/exaggerated-safety