Promptfoo overview
Promptfoo is a command-line tool that tests an LLM application from a config file: it lists the questions, the app that answers them and what a good answer looks like, then runs the grid and prints a pass rate.
Last updated: 15 Oct, 2026 · Promptfoo 0.124.1
An LLM application is hard to test by clicking through it. The answer changes with the prompt, the model and the question, and a change that fixes one case can break another. Promptfoo puts the questions and the checks in a file next to your code, so one command re-runs them all and tells you what broke. This course builds that file for a shop support bot and grows it into a full test suite, and every page runs with no API key.
The ideas this course is built on
Promptfoo is a small number of pieces that fit together. Each gets its own lessons later; here is the whole picture in one place.
- The config file (
promptfooconfig.yaml) lists everything a run needs: the provider, the prompt and the tests. - A provider is the application under test. It can be the built-in
echo, a Python file you write, or a hosted model. - Prompts and vars turn one template into many questions, so a single prompt is run against a table of inputs.
- Asserts say what counts as a good answer, from a plain substring to a schema to a model acting as a judge.
- One command,
promptfoo eval, runs every prompt against every test and reports a pass rate. - Every run is kept in a local database, so you can list past runs, reopen one in a browser and compare them.
What you will build
One example grows through the whole course: a support bot for a shop that answers from a short handbook. It starts as a few lines of Python checked by hand, becomes a provider promptfoo calls, gains deterministic checks and then a model judge that needs no key, is compared across two prompts and two models, and ends as a retrieval bot whose answer and whose search are scored apart. The two facts it knows, where order A17 is and how long a refund takes, stay the same from the first lesson to the last.
The seven parts
echo provider or a Python file you write, and the model judge in part four is a grading script promptfoo calls instead of a hosted model. The course is pinned to promptfoo 0.124.1 on Node 24, and where the installed tool behaves differently from the published docs, the lesson shows what the tool does and says so.Related
- Next: Installation and setup
- Reference: Promptfoo documentation
Every expert started right here.