Skip to main content

One post tagged with "meta"

View All Tags

How to run CyberSecEval

Ian Webster
Engineer & OWASP Gen AI Red Teaming Contributor

Your LLM's security is only as strong as its weakest prompt. This guide shows you how to use Promptfoo to run standardized cybersecurity evaluations against any AI model, including OpenAI, Ollama, and HuggingFace models.

Importantly, Promptfoo also allows you to run these evaluations on your application rather than just the base model. This is important because behavior will vary based on how you've wrapped any given model.

We'll use Meta's CyberSecEval benchmark to test models against prompt injection vulnerabilities. According to Meta, even state-of-the-art models show between 25% and 50% successful prompt injection rates, making this evaluation critical for production deployments.

The end result is a report that shows you how well your model is able to defend against prompt injection attacks.

CyberSecEval report

info

To jump straight to the code, click here.