Promptfoo
An open-source command-line tool for testing prompts and models against test cases defined in a config file, including security red teaming.

Promptfoo is an open-source command-line tool for testing prompts and models against test cases defined in a config file, including security red teaming. It lets a team treat prompts like code: every change runs against the same cases before it ships.
Tests live in a YAML file: inputs, the prompts and models to compare, and assertions on the output, from exact matches to a judge model. It runs locally or in CI, so a prompt change that breaks a case fails the build, see prompt regression. Running two models side by side on the same cases is a cheap way to check whether a cheaper model is good enough. Its red teaming mode generates attacks such as prompt injection and jailbreaks against your application, a practical start for AI red teaming.
In March 2026 OpenAI announced an agreement to acquire Promptfoo and said the project would stay open source (Promptfoo’s announcement). Promptfoo checks behavior on your own cases; for detailed RAG retrieval metrics many teams pair it with Ragas.
Sources
- Promptfoo: LLM red teaming guide (open source) promptfoo.dev
- Promptfoo: Promptfoo is joining OpenAI promptfoo.dev
Related terms
- Prompt regression: An answer that used to be right goes wrong after a change to the prompt or the model.
- AI red teaming: Deliberately attacking your own AI feature with harmful, tricky and injected inputs to find failures before users or attackers do.
- Evals: A repeatable test set that scores an AI feature, so changes can be measured instead of guessed.
- Ragas: An open-source Python library for evaluating RAG systems with metrics such as faithfulness, answer relevancy, context precision and context recall.
- DeepEval: An open-source Python framework that tests LLM applications the way pytest tests code, with ready-made metrics for RAG and agents.
- Prompt injection: Instructions hidden in data (a web page, an email, a file) that the model follows as if they came from you.
