Why Every Prompt Edit Needs a Regression Gate
Changing two sentences in a system prompt can silently undo weeks of guardrail tuning. Unlike unit tests for deterministic functions, LLM behavior shifts probabilistically across model versions and temperature settings.
Declarative evaluation configs let security engineers treat adversarial test suites just like pytest or Jest—failing builds automatically when a model leaks system instructions or emits disallowed tool calls.
# promptfooconfig.yaml (minimal security gate)
targets:
- id: openai:gpt-4o-mini
config:
temperature: 0
redteam:
plugins:
- prompt-injection
- pii:direct
- excessive-agency
strategies:
- base64
- jailbreak:composite