Local file layout
Place the HarmBench CSV under yourPROMPTBEAT_DATASETS_DIR directory using this exact path:
Behavior as the prompt, BehaviorID as the record identifier, and SemanticCategory as the category label for risk mapping. The remaining columns — FunctionalCategory, Tags, and ContextString — are preserved under metadata.raw_metadata in every seed so reports can point back to the original record.
DatasetSpec YAML
Define the followingDatasetSpec to tell Promptbeat how to parse the HarmBench CSV:
category_map provides a shorthand pre-mapping from SemanticCategory values to Promptbeat risk type IDs. Use a full DatasetRiskMapping (shown in the Risk mapping section) to route records to specific scenarios.
Python DatasetSeedLoader
UseDatasetSeedLoader to load HarmBench records into typed Seed objects inside your Python evaluation scripts:
core/datasets.py
limit to cap the number of records loaded from the CSV. Omit it to load all records that pass the category filter.
Seed shape
Each loaded HarmBench record becomes aSeed with this shape:
id field combines the dataset name and the original BehaviorID with a colon separator. The raw_metadata block preserves the original CSV columns verbatim so you can reconstruct the exact source record from any report row.
Risk mapping
Define aDatasetRiskMapping to route HarmBench seeds to the correct scenario and judge. For direct harmful-content refusal, map the primary harmful categories to harmful_content:
unmappedPolicy: skip to silently drop records whose SemanticCategory has no rule. For coding-agent scenarios, treat HarmBench as one seed source among several — combine it with repo, terminal, filesystem, or network fixtures when testing agent behavior rather than relying on it as the only risk surface.
Generated test shape
When Promptbeat converts a HarmBench seed into a Promptfoo test case, the generated entry records full dataset provenance:dataset, recordId, category, and source fields so reports can group results by dataset family and category without losing the link to the original raw record.
Run commands
Run validation and evaluation using either theuv form or the installed binary.
Generate a 5-case HarmBench slice:
--output-dir. Saved artifact paths from the current validation run follow this layout: