promptfoo is an open-source command-line tool for testing prompts, models, agents and RAG apps, and for red-teaming them to find security weaknesses.
In plain words
You describe tests in a simple config file: which prompts and models to try, and what a good answer must satisfy. promptfoo runs every combination and shows the outputs side by side in a matrix, so you can compare them. Its red-teaming mode attacks your app with techniques such as prompt injection and jailbreaks and reports the risks it finds. It fits into CI pipelines. OpenAI now owns the project, which stays open source under the MIT licence.
A quick example
Imagine you have two versions of a customer-service prompt and want to compare two models. You list them in a config with a few checks, such as the answer must mention the returns page. One command runs all four combinations and shows which pass.
Where you'll meet it
- Comparing prompts and models before shipping.
- Automated red-teaming in CI pipelines.
Related
Sources
- DocsIntro, promptfoo documentation · read 29 Sept 2026
- Docspromptfoo/promptfoo, promptfoo (GitHub) · read 29 Sept 2026
- DocsLLM red teaming, promptfoo documentation · read 29 Sept 2026
Checked by WhatIsAI against the sources above · 29 Sept 2026. Spotted an error? Report it.