promptfoo banner
promptfoo promptfoo

promptfoo

DevOps community intermediate

Description

<a href="https://npmjs.com/package/promptfoo"></a> <a href="https://npmjs.com/package/promptfoo"></a> <a href="https://github.com/promptfoo/promptfoo/actions/workflows/main.yml"></a> <a href="https://github.com/promptfoo/promptfoo/blob/main/LICENSE"></a>

Installation

Terminal
claude install-skill https://github.com/promptfoo/promptfoo

README

Promptfoo: LLM evals & red teaming

promptfoo is a CLI and library for evaluating and red-teaming LLM apps. Stop the trial-and-error approach - start shipping secure, reliable AI apps.

Website · Getting Started · Red Teaming · Documentation · Discord

Promptfoo is now part of OpenAI. Promptfoo remains open source and MIT licensed. Read the [company update](https://www.promptfoo.dev/blog/promptfoo-joining-openai/).

Quick Start

npm install -g promptfoo
promptfoo init --example getting-started

Also available via `brew install promptfoo` and `pip install promptfoo`. You can also use `npx promptfoo@latest` to run any command without installing.

Most LLM providers require an API key. Set yours as an environment variable:

export OPENAI_API_KEY=sk-abc123

Once you're in the example directory, run an eval and view results:

cd getting-started
promptfoo eval
promptfoo view

See [Getting Started](https://www.promptfoo.dev/docs/getting-started/) (evals) or [Red Teaming](https://www.promptfoo.dev/docs/red-team/) (vulnerability scanning) for more.

What can you do with Promptfoo?

    undefined

...