

CLI and web tool for testing, evaluating, red‑teaming, and monitoring LLM prompts and outputs to catch regressions and vulnerabilities.

CLI and web tool for testing, evaluating, red‑teaming, and monitoring LLM prompts and outputs to catch regressions and vulnerabilities.
Promptfoo is an open-source toolset for testing, evaluating, and red‑teaming large language model (LLM) prompts and apps. It provides a declarative config system, CLI and web UI, and integrations for CI/CD so teams can run evals, compare outputs across models/providers, detect regressions, and find security or alignment vulnerabilities. Promptfoo supports templating and filters for prompt generation, multiple provider plugins, Docker distribution, and GitHub Actions to automate before/after evaluations on PRs, enabling test‑driven LLM development and safer deployments.




Promptfoo is completely free and open-source under the MIT license, allowing users to run it locally or self-host without any paid plans. This means there are no subscription fees or hidden costs, making it accessible for everyone interested in utilizing its features.
Promptfoo is designed to provide a seamless experience for users interested in AI prompt generation without financial barriers. The software's open-source nature means that anyone can access the source code and customize it to meet specific needs.
Self-hosting Promptfoo allows users to run the software on their own servers or machines. This gives you full control over your data and environment. By self-hosting, you can:
To start using Promptfoo for testing LLM prompts, download it from the official website, install it on your system, and configure either the Command Line Interface (CLI) or the web UI. You can then begin testing your prompts using the evaluation tools provided by Promptfoo.
To effectively start using Promptfoo, follow these steps:
Download Promptfoo: Visit the official Promptfoo website and download the latest version compatible with your operating system (Windows, macOS, or Linux). Ensure that your system meets the required specifications.
Installation: After downloading, extract the files and follow the installation instructions provided for your platform. For CLI users, you may need to run installation commands in your terminal. For web UI users, simply open the application in your web browser.
Configuration:
npm install or pip install depending on your setup.Testing LLM Prompts: Once set up, you can start creating and testing prompts. Promptfoo provides various evaluation tools, such as:
Iterate and Improve: Based on the results from your evaluations, refine your prompts to enhance performance. Utilize the feedback provided by Promptfoo to make data-driven adjustments.
Promptfoo features red-teaming, vulnerability scanning, multi-provider model comparison, and a user-friendly command-line interface (CLI) along with a web UI for efficient prompt evaluation and analysis, making it a versatile tool for developers and AI researchers.
Promptfoo is designed to enhance the security and performance of AI prompts through its comprehensive feature set:
Red-Teaming: This feature allows users to conduct simulated attack scenarios on AI models. By mimicking potential threats, developers can identify vulnerabilities in their prompts, ensuring that the AI behaves as intended under various conditions. For example, users can test how an AI responds to misleading or malicious inputs, allowing for proactive adjustments.
Vulnerability Scanning: Promptfoo incorporates automated tools to scan AI models for vulnerabilities. This means that users can quickly identify and address security flaws that could be exploited. By regularly running these scans, developers can maintain robust security standards and ensure the integrity of their AI systems.
Multi-Provider Model Comparison: With the ability to compare AI models from different providers, Promptfoo empowers users to make informed decisions about which model to deploy. This feature is particularly valuable for businesses looking to optimize performance and cost-efficiency. Users can analyze metrics such as accuracy, response time, and resource usage, helping them select the best model for their specific needs.
Promptfoo distinguishes itself from other LLM testing tools by being open-source, entirely free, and offering unique features such as automated regression testing and multi-provider model comparison, which many competitors lack. This combination makes it a robust choice for developers and researchers alike.
Promptfoo is an advanced tool designed for testing large language models (LLMs) effectively. Unlike proprietary tools that come with hefty licensing fees, Promptfoo’s open-source nature allows developers and researchers to utilize its features without financial barriers. This democratizes access to powerful testing capabilities, making it a popular choice in the AI community.
Automated Regression Testing: This feature allows users to automatically compare new model outputs against previous versions, ensuring that updates do not degrade performance. For example, if a new version of an AI model is deployed, Promptfoo can quickly run tests to check for any regressions in accuracy or functionality.
Multi-Provider Model Comparison: With this functionality, users can test and compare outputs from various LLM providers like OpenAI, Google, and others within the same framework. This is particularly useful for projects that require the best possible performance from multiple sources, as it helps identify which model performs best for specific tasks.
User-Friendly Interface: Promptfoo’s interface is designed to be intuitive, making it easier for users to set up tests and interpret results without extensive technical expertise.
Yes, you can integrate Promptfoo with your existing CI/CD pipeline using its official GitHub Action integrations. This feature allows you to seamlessly incorporate automated tests and evaluations into your workflows, enhancing your development process and ensuring quality at every stage.
Integrating Promptfoo into your CI/CD pipeline is straightforward due to its official GitHub Action support. Here’s how you can do it:
Set Up GitHub Actions: First, ensure that you have a GitHub repository for your project. Navigate to the "Actions" tab and create a new workflow by selecting a template or starting from scratch.
Add Promptfoo Action: Include the following code snippet in your workflow file (e.g., .github/workflows/ci.yml):
name: CI
on: [push]
jobs:
test:
runs-on: ubuntu-latest
steps:
- name: Checkout Code
uses: actions/checkout@v2
- name: Run Promptfoo Tests
uses: promptfoo/promptfoo-action@v1
with:
api-token: ${{ secrets.PROMPTFOO_API_TOKEN }}
Make sure to replace PROMPTFOO_API_TOKEN with your actual API token stored in your GitHub secrets.
Customize Evaluations: You can customize the tests and evaluations you want Promptfoo to run based on your project needs. This flexibility allows you to tailor the integration for different stages of your development lifecycle.
Monitor Results: After each push, your GitHub Actions will execute the tests, and you can monitor the results directly in your repository. This visibility helps maintain high code quality and speeds up the development process.
By following these guidelines, you can effectively integrate Promptfoo into your CI/CD pipeline, enhancing your development workflow and ensuring robust quality assurance practices.
Compare Promptfoo: vs Speech To Markdown · vs FluentDB · vs ReExplain · vs YC Has It