Implementation:Promptfoo Promptfoo Strategies Data Catalog
| Knowledge Sources | |
|---|---|
| Domains | Red_Teaming, Documentation |
| Last Updated | 2026-02-14 07:45 GMT |
Overview
Concrete data catalog defining the complete set of red team attack strategies with their categories, descriptions, costs, and effectiveness ratings for the documentation site.
Description
The Strategies_Data_Catalog (strategies.ts) exports the authoritative list of all red team strategies available in promptfoo. Each strategy entry includes its category (Custom, Dynamic Single-Turn, Dynamic Multi-Turn, Encoding), display name, description, cost tier (Low/Medium/High), ASR increase percentage, and documentation link. This data drives the strategy reference tables on the documentation website.
Usage
Import this module in documentation site components (e.g., StrategyTable.tsx) to render strategy reference tables with filtering and sorting.
Code Reference
Source Location
- Repository: Promptfoo_Promptfoo
- File: site/docs/_shared/data/strategies.ts
- Lines: 1-370
Signature
export interface Strategy {
category: string;
strategy: string;
displayName: string;
description: string;
longDescription: string;
cost: string;
asrIncrease: string;
link?: string;
recommended?: boolean;
}
export const strategies: Strategy[]
Import
import { strategies, type Strategy } from '../data/strategies';
I/O Contract
Inputs
| Name | Type | Required | Description |
|---|---|---|---|
| (none) | — | — | Static data export, no runtime inputs |
Outputs
| Name | Type | Description |
|---|---|---|
| strategies | Strategy[] | Complete array of strategy definitions |
Usage Examples
import { strategies } from '../data/strategies';
// Filter multi-turn strategies
const multiTurn = strategies.filter(s => s.category === 'Dynamic (Multi-Turn)');
// Find recommended strategies
const recommended = strategies.filter(s => s.recommended);