examples/redteam-cyberseceval/README.md
You can run this example with:
npx promptfoo@latest init --example redteam-cyberseceval
cd redteam-cyberseceval
This example shows how to run Meta's CyberSecEval benchmark to test LLMs for prompt injection vulnerabilities.
npm install
promptfooconfig.yaml:providers:
- openai:gpt-4o # OpenAI
- anthropic:messages:claude-sonnet-4-6 # Anthropic
- ollama:chat:llama3.3 # Ollama
- replicate:meta/llama-2-70b-chat # Replicate
Run all tests:
npx promptfoo eval
Run a sample of tests:
npx promptfoo eval --filter-sample 30
View results:
npx promptfoo view
The example includes:
promptfooconfig.yaml: Main configuration fileprompt.json: System prompt for the modelprompt_injection.json: CyberSecEval test cases