Promptfoo
The LLM Prompt Testing tool is a library designed to evaluate the quality of LLM (Language Model Mathematics) prompts and perform testing. ...
Last verified:
What is Promptfoo?
Promptfoo is an open-source CLI tool and library for evaluating and red-teaming large language model (LLM) applications. It enables developers to build reliable prompts, models, and RAG systems with benchmarks specific to their use case, while also securing apps through automated red teaming and pentesting. The tool produces matrix views that let users quickly evaluate outputs across many prompts and models side-by-side.
Key features include automated testing with customizable test cases and assertions, support for 50+ LLM providers (OpenAI, Anthropic, Azure, Google, HuggingFace, Llama, and custom API providers), caching and concurrency for fast evaluations, live reloading, automatic scoring with defined metrics, and CI/CD integration. It offers both a command-line interface and an interactive web UI for viewing and analyzing results, with features like pass/fail marking, custom scoring, comments, and sharing capabilities.
Promptfoo is designed for individual developers, small teams, and enterprises building LLM applications. It's particularly useful for AI engineers who need test-driven LLM development instead of trial-and-error approaches, security teams conducting vulnerability scanning for prompt injections and jailbreaks, and organizations serving millions of users in production who need systematic evaluation workflows.
The tool is battle-tested, having been built for LLM apps serving over 10 million users in production. It is completely language-agnostic (works with Python, JavaScript, or any language), runs locally for privacy, and is 100% open-source under the MIT license with no strings attached.
Promptfoo pricing
Pricing model: Free
Promptfoo offers a free Community tier and paid Enterprise/On-Premise plans. The Community version is free forever under MIT license and includes: all LLM evaluation features, all model providers and integrations, red teaming with 10k probes/month limit, custom integration with your own app, ability to run locally or self-host on your own infrastructure, vulnerability scanning, and community support. The Enterprise plan includes all Community features plus: custom red teaming limits, team sharing & collaboration, continuous monitoring, centralized security/compliance dashboard, customizable attack profiles and target settings, SSO and granular permission profiles, Promptfoo API access, managed cloud deployment, professional services support, and priority support with SLA guarantees. Enterprise pricing is customized based on team size and needs - contact for a personalized quote. The On-Premise plan includes all Enterprise features plus deployment on your own infrastructure, complete data isolation, dedicated runner, and assigned deployment engineer. Cloud sharing is free at promptfoo.app with links private to your organization.
Promptfoo pros
- Open-source under MIT license with no feature restrictions
- Runs completely locally for maximum privacy
- Supports 50+ LLM providers including OpenAI, Anthropic, Azure, Google, HuggingFace, and Llama
- Matrix view for side-by-side comparison of multiple prompts and models
- Fast evaluation with caching, concurrency, and live reloading
- Simple declarative test cases without writing code or notebooks
- Built-in web UI for viewing, analyzing, and sharing results
- CI/CD integration for continuous testing in development workflows
- Automated red teaming with 30+ configurable attack plugins
- Supports CSV, JSON, YAML, JavaScript, Python, and Google Sheets for test data
- Language agnostic - works with Python, JavaScript, or any language
- Custom assertions including javascript, llm-rubric, contains-json, and similarity checks
- Built-in sharing functionality with private organization links at promptfoo.app
- Dynamic variable generation with JavaScript and Python scripts
- Nunjucks templating for complex prompt templates with loops and conditionals
- High-level vulnerability and risk reports for security assessment
- Tool use and function calling support for Google, OpenAI, and Anthropic models
Promptfoo cons
- Red teaming limited to 10k probes/month in free Community version
- Enterprise pricing is customized and not publicly disclosed
- Learning curve for YAML configuration and assertion types
- PDF parsing requires installing separate pdf-parse package
- No free cloud-hosted version - must self-host or run locally
- Advanced features like continuous monitoring require Enterprise plan
- Team sharing and collaboration features limited to Enterprise
- SSO and granular permissions only available in Enterprise tier
- Acquired by OpenAI which raises independence concerns for enterprise security teams
Frequently asked questions about Promptfoo
What is Promptfoo?
Promptfoo is a local-first, open-source tool designed to help evaluate (eval) large language models (LLMs). It is a developer-friendly CLI and library for testing and red-teaming LLM apps. With promptfoo, you can build reliable prompts, models, and RAGs with benchmarks specific to your use-case, secure your apps with automated red teaming and pentesting, and speed up evaluations with caching, concurrency, and live reloading. The goal is test-driven LLM development, not trial-and-error.
Is Promptfoo free?
The core tool is open source under the MIT License and free to self-host with no feature restrictions for LLM evaluation. The Community version is free forever and includes all LLM evaluation features, all model providers and integrations, and red teaming with up to 10k probes per month. You can run it locally or self-host on your own infrastructure at no cost. Enterprise features like team collaboration, continuous monitoring, and SSO require a paid plan.
What's the difference between Promptfoo Open Source and Promptfoo Enterprise?
Promptfoo Open Source is a free, open-source version that focuses specifically on local testing and one-off scans. Promptfoo Enterprise is the commercial version offering additional capabilities such as team collaboration, continuous monitoring, a centralized security dashboard, customized plugins, SSO, access control, cloud deployment options, and priority support with SLA guarantees. Enterprise also includes custom red teaming limits beyond the 10k probes/month in Community.
How does Promptfoo differ from other LLM security tools?
Promptfoo is the only LLM security tool that includes: dynamic test sets unique to your application, ML search and optimization algorithms that explore the state space to find novel vulnerabilities, 30+ configurable plugins including advanced attack types like conversational jailbreaks and indirect prompt injections, a focus on testing application security rather than base models, support for both black-box and gray-box applications, and no SDK or agent requirements.
What types of LLM vulnerabilities can Promptfoo detect?
Promptfoo covers a wide range of vulnerabilities including: prompt injections, jailbreaks, insecure output handling, data poisoning, sensitive information/PII disclosure, insecure plugin design, excessive agency, and overreliance. The red teaming feature can scan for security vulnerabilities and compliance risks, exposing weaknesses like opportunities for prompt injection attacks, agents using tools in unsafe ways, unintended API calls, and data leakage through responses.
How does Promptfoo integrate with existing development workflows?
Promptfoo integrates with common CI/CD pipelines for continuous vulnerability detection throughout the development lifecycle. It offers support for popular CI/CD platforms, configurable scans on code changes or pull requests, scheduled intervals, and flexibility to run locally or self-hosted. You can use the command-line tool or library to execute evaluations and integrate results into your existing development workflow.
What deployment options are available for Promptfoo?
Promptfoo offers both cloud-based and on-premises solutions. You can run it locally on your machine, self-host on your own infrastructure, use managed cloud deployment (Enterprise), or deploy on-premises for complete data isolation and control. The on-premises option provides complete data isolation and is available in the On-Premise plan with dedicated runner and assigned deployment engineer.
How do I view and analyze evaluation results?
After running an eval, view results in your browser using 'npx promptfoo@latest view'. The interactive web viewer lets you compare LLM outputs side-by-side, rate responses, add comments, mark pass/fail, set custom scores, and share evaluations. You can filter by All/Failures/Passes/Errors/Different/Highlights, search with text or regex, filter by metrics and metadata, and export results as YAML config, CSV, JSON, DPO JSON for training data, or Burp payloads for security testing.
What model providers does Promptfoo support?
Promptfoo supports 50+ LLM providers including OpenAI (GPT models), Anthropic (Claude), Azure, Google (Gemini), HuggingFace, open-source models like Llama via Ollama, and custom API providers for any LLM API. You can compare performance across GPT, Claude, Gemini, Llama, and more in a single evaluation. Provider configuration supports temperature, token limits, tool use, and function calling for Google, OpenAI, and Anthropic models.
Why are there usage limits on red teaming in the free version?
Certain red teaming plugins require inference for dynamic test generation and grading, which incurs computational costs. The open-source Community version includes up to 10k probes per month at no charge. Enterprise customers can purchase additional probes for larger scale testing and get custom red teaming limits based on their needs. This usage limit helps sustain the free tier while offering scalable options for enterprise testing.