Promptfoo is a command-line tool and library for testing prompts, agents, and RAG setups through declarative configs. It supports side-by-side model comparison, automated evals, and vulnerability scanning with CI/CD hooks.
Overview
Promptfoo helps teams evaluate and harden LLM-based applications before production. Users define tests in declarative configuration, run evaluations from the terminal, and review results in a local viewer or generated reports. The tool compares outputs across providers such as OpenAI, Anthropic, Azure, Bedrock, and Ollama, and can automate checks in continuous integration.
Beyond quality metrics, Promptfoo supports red teaming and vulnerability scanning tailored to application context, including injection and jailbreak-style tests. Marketing material also describes remediation guidance in pull requests, integration with GitHub, GitLab, Jenkins, MCP and agent frameworks, and on-premise or cloud deployment options for enterprise workflows.
The project is positioned as developer-first: eval jobs can run entirely on the local machine so prompts and data need not leave that environment. It ships as an npm package, Homebrew formula, pip package, and via npx without a global install.
Promptfoo is used for prompt iteration, agent testing, RAG validation, security vulnerability reports, and code scanning for LLM-related compliance issues in pull requests.
Key features
- Declarative YAML eval configurations
- Side-by-side multi-model comparison
- Red teaming and vulnerability scanning
- Local execution without cloud upload
- CI/CD pipeline automation
- Pull request code scanning hooks
- Security vulnerability report generation
- npm, pip, Homebrew, and npx installs
Use cases
- Regression testing prompts before release
- Comparing foundation models on same tasks
- Scanning agents and RAG for AI flaws
- Gating LLM changes in CI pipelines
- Sharing eval metrics across a team