Promptfoo

Open-source CLI for testing, comparing and red-teaming LLM prompts

AI Prompt ToolsFree planOverseasβ˜…β˜…β˜…β˜…β˜† 4.0

What is Promptfoo?

Promptfoo is an open-source command-line tool for testing prompts and models before they reach users. You write a configuration file listing prompts, providers and test cases, then run it to see how each combination performs against assertions, model-graded rubrics and similarity checks. Because it lives in the repository, evaluations run in CI and a prompt change that regresses quality can fail the build the same way a broken unit test would. It also scans for jailbreaks, prompt injection and data leakage, and reports the results as readable tables rather than opaque scores.

Last updated: 2026-09-20. This site only provides an index; for exact features, pricing, and licensing, see the official website.

Key features

  • Declarative YAML config for prompts, providers and test cases
  • Assertions covering string matching, JSON validity and thresholds
  • Model-graded rubrics for subjective quality checks
  • Side-by-side comparison across providers and prompt versions
  • Red-team scans for jailbreaks, injection and data leakage
  • Runs in CI so a prompt regression can fail a build

Pros & cons

Strengths

  • Open source, so it runs locally and in CI with no per-test fee
  • Red-team and evaluation modes share one configuration file
  • Results are readable, which makes prompt debates concrete

Watch out for

  • Configuration and CLI workflow assume developer habits
  • Model-graded assertions cost tokens on every run
  • Visual reporting is thinner than hosted evaluation platforms

Best for & use cases

prompt regression testing, model comparison, llm red-teaming and ci checks

If you're comparing similar products, check the alternatives below, or browse all tools in the AI Prompt Tools category.

FAQ

Does Promptfoo need a hosted account?

No. It is a local command-line tool and a configuration file. An optional hosted dashboard exists for sharing results with a team, but the evaluation itself runs on your machine or in your pipeline.

What can it assert about an answer?

Anything you can express as a check: exact or partial string matches, valid JSON, a numeric threshold, a similarity score, or a rubric graded by another model. Custom JavaScript and Python assertions cover the rest.

Is red-teaming separate from evaluation?

It uses the same setup. You point a scan at your prompts and providers and it probes for jailbreaks, prompt injection and leakage, so safety checks live next to ordinary quality checks.