Promptfoo Documentation - LLM Evals and Red Teaming
by Promptfoo
Turn prompt tweaking into a test suite, then attack your own agent before someone else does.
Overview
Promptfoo is an open-source, MIT-licensed CLI and library for evaluating and red-teaming LLM applications, and its documentation is organised as two parallel tracks. The Evals track covers installation, declarative configuration, assertions and metrics (deterministic checks plus model-graded rubrics), the runtime, and usage guides for comparing prompts side by side across providers including OpenAI, Anthropic, Google, Amazon Bedrock, Azure OpenAI, Replicate, Hugging Face and local or custom endpoints. The Red teaming track covers quickstart, target discovery, concepts, plugins, strategies, frameworks and troubleshooting: plugins are adversarial testers for categories such as harmful content, broken object-level authorization (BOLA), broken function-level authorization (BFLA) and competitor endorsement, while strategies include prompt injection, jailbreaks, Tree of Attacks with Pruning, adversarial suffixes and ASCII-art obfuscation. Findings map onto the OWASP LLM Top 10, the NIST AI Risk Management Framework and the EU AI Act. Further sections cover Providers, Integrations (GitHub Action, Jest, Vitest and general CI/CD), Code scanning, Model Audit, Enterprise and Contributing. Install with npm, Homebrew or pip; the open-source eval runner executes on your own machine and calls providers directly, so prompts and outputs never transit a vendor. The repository carries roughly 24,000 GitHub stars and about 9,400 commits, its own FAQ states that Promptfoo is now part of OpenAI, and doc pages carry per-page update stamps - the intro page was last updated 13 August 2026.
At a Glance
- Topic
- Frameworks
- Level
- Intermediate
- Format
- Documentation
- Cost
- Freemium
- Duration
- ~2-4 hours to work through the eval and red-team quickstarts; ongoing reference thereafter
- Provider
- Promptfoo
- Hands-on
- Yes — code/exercises
- Certificate
- None
What You’ll Learn
- ✓Write declarative eval configs that compare prompts across many model providers
- ✓Score outputs automatically with deterministic assertions and model-graded rubrics
- ✓Run red-team scans that generate thousands of adversarial probes against your own app
- ✓Test full agents and RAG pipelines end to end rather than isolated prompt strings
- ✓Wire evals into CI/CD using the GitHub Action or the Jest and Vitest integrations
- ✓Map red-team findings to OWASP LLM Top 10, NIST AI RMF and EU AI Act reporting
- ✓Probe authorization flaws such as BOLA and BFLA that generic safety filters miss
Highlights
- •Evals run 100% locally - prompts, outputs and test data stay on your machine
- •24k+ GitHub stars and roughly 9,400 commits on an MIT-licensed core, so it is not an abandoned side project
- •Red-team plugins cover application-level authorization bugs (BOLA, BFLA), not just toxic-output classification
- •Attack strategies are named and documented - Tree of Attacks with Pruning, adversarial suffixes, ASCII art - so you can reason about coverage
- •The project's own FAQ states Promptfoo is now part of OpenAI, and doc pages are individually date-stamped
Who It’s For
Best For
- ✓AI engineers who need regression tests for prompts, agents and RAG pipelines
- ✓Security engineers red-teaming an LLM application before it ships
- ✓Platform teams putting automated LLM quality and safety gates into CI/CD
Prerequisites
- •Comfortable on the command line with Node.js or Python installed
- •An API key for at least one model provider, or a locally served model
- •Basic understanding of how your own LLM application is structured (prompts, tools, retrieval)
FAQ
What is Promptfoo Documentation - LLM Evals and Red Teaming?
The official documentation for Promptfoo, an open-source CLI and library that evaluates and red-teams LLM applications, agents and RAG pipelines. It is written for engineers who need regression tests and security scans rather than vibes. Working through it, you will build declarative eval configs, write assertions that score model output automatically, run adversarial scans against your own app, and wire both into CI/CD.
Is Promptfoo Documentation - LLM Evals and Red Teaming free?
Promptfoo Documentation - LLM Evals and Red Teaming offers free content, with paid options for certificates or premium features.
What level is Promptfoo Documentation - LLM Evals and Red Teaming for?
Promptfoo Documentation - LLM Evals and Red Teaming is aimed at a intermediate audience. Recommended background: Comfortable on the command line with Node.js or Python installed, An API key for at least one model provider, or a locally served model, Basic understanding of how your own LLM application is structured (prompts, tools, retrieval).
How long does Promptfoo Documentation - LLM Evals and Red Teaming take?
Expect roughly ~2-4 hours to work through the eval and red-team quickstarts; ongoing reference thereafter. Most learners work through it at their own pace.
What will I learn from Promptfoo Documentation - LLM Evals and Red Teaming?
You'll learn: Write declarative eval configs that compare prompts across many model providers; Score outputs automatically with deterministic assertions and model-graded rubrics; Run red-team scans that generate thousands of adversarial probes against your own app; Test full agents and RAG pipelines end to end rather than isolated prompt strings; Wire evals into CI/CD using the GitHub Action or the Jest and Vitest integrations; Map red-team findings to OWASP LLM Top 10, NIST AI RMF and EU AI Act reporting; Probe authorization flaws such as BOLA and BFLA that generic safety filters miss.
Topics
Sources
This page was written from 3 sources, 1 on domains other than promptfoo.dev.
- 1.promptfoo.dev — introvendor
- 2.github.com — promptfoo
- 3.promptfoo.dev — red teamvendor