Open-source LLM testing and red-teaming — test prompts, evaluate outputs, catch regressions
Evals & ObservabilityFree
Promptfoo is an open-source CLI and library for testing, evaluating, and red-teaming LLM applications. Write test cases in YAML or JavaScript, run them against multiple models (GPT, Claude, Llama) simultaneously, and compare results in a local web UI. Supports automated red-teaming to find jailbreaks, prompt injections, and safety failures. 4,000+ GitHub stars.
TruLens — Alternative open-source eval library; stronger for LangChain/LlamaIndex pipelines.
FAQ
What is Promptfoo?
Promptfoo is an open-source tool for evaluating LLM prompts and outputs. You define test cases (inputs + expected outputs or grading criteria) in YAML files, and Promptfoo runs them against one or many LLM providers simultaneously, scoring results and displaying them in a side-by-side comparison table. It also includes automated red-teaming to probe for safety issues, hallucinations, and prompt injections.
Is Promptfoo free?
Promptfoo is completely free and open source (MIT license). You run it locally — no data leaves your machine except to the LLM APIs you configure. There's a hosted cloud option for teams who want shared dashboards and collaboration, but the core evaluation tool is free. GitHub: github.com/promptfoo/promptfoo.
How does Promptfoo's red-teaming work?
Promptfoo's automated red-teaming generates adversarial test cases targeting specific vulnerability categories: jailbreaks, prompt injection attacks, PII disclosure, off-topic responses, harmful content, hallucination, and more. It uses a separate LLM to generate adversarial prompts and then scores whether your application handles them appropriately. It can generate hundreds of red-team attacks and give you a safety score.
How does Promptfoo compare to Braintrust?
Both evaluate LLM outputs, but different approaches. Promptfoo is open-source, CLI-first, and developer-oriented — you define tests in YAML/JS and run them locally. Braintrust is a cloud platform with a polished UI, team collaboration, and production monitoring. Promptfoo is better for CI/CD integration and open-source projects; Braintrust for enterprise teams who need collaboration and logging.
SEO, AI search (how ChatGPT, Perplexity and Google describe Promptfoo), UX, CRO and support from one account manager, with a monthly report. Includes a Featured launch on db.fyi. Starts with a free audit.
Founding offer: $299 a month for your first 3 months, plus a free case study.