Jump to content

Connect SuperML | Leeroopedia MCP: Equip your AI agents with best practices, code verification, and debugging knowledge. Powered by Leeroo — building Organizational Superintelligence. Contact us at founders@leeroo.com.

Principle:Promptfoo Promptfoo Strategy Application

From Leeroopedia
Revision as of 17:35, 16 February 2026 by Admin (talk | contribs) (Auto-imported from principles/Promptfoo_Promptfoo_Strategy_Application.md)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Knowledge Sources
Domains Security_Testing, Adversarial_ML
Last Updated 2026-02-14 08:00 GMT

Overview

A transformation pipeline mechanism that applies encoding, jailbreaking, and evasion strategies to base adversarial test cases.

Description

Strategy Application transforms base test cases (generated by plugins) into more sophisticated attacks by applying evasion techniques. Strategies include encoding schemes (Base64, ROT13, leetspeak, hex), jailbreak templates, multi-turn escalation (GOAT, crescendo), and composite approaches.

Each strategy takes existing test cases and produces new variants with the attack payload transformed. This multiplicative approach means N plugins x M strategies can produce NxM attack variants, dramatically increasing test coverage.

Usage

Use this principle after plugin-based test generation to amplify attack diversity. Strategy selection is configured via the `strategies:` array in red team config.

Theoretical Basis

Pseudo-code Logic:

1. For each strategy in config:
   a. Load strategy module (built-in or file://)
   b. Apply strategy.action(testCases, injectVar, config)
   c. Track requested vs. generated counts
2. Combine original (if basic strategy enabled) + strategy-transformed tests
3. Return combined test cases with strategy metadata

Related Pages

Implemented By

Page Connections

Double-click a node to navigate. Hold to expand connections.
Principle
Implementation
Heuristic
Environment