Promptfoopromptfoo 0.124.1 · Node 24 · Python 3
Dashboard
0%

promptfoo view: every run kept

promptfoo list evals prints the runs promptfoo has kept, because every promptfoo eval is saved to a local database you can list, reopen and compare.

Last updated: 15 Oct, 2026 · Promptfoo 0.124.1

Each run in the reading-the-table lesson was saved, not only printed. Promptfoo keeps every eval in a small database under your home directory, so a run is never lost when the terminal scrolls away. This lesson lists the kept runs and shows the command that opens one in a browser.

Project files used on this pageThis lesson builds on a project from earlier lessons. The code below imports these files. Click a file to see its code, or follow the link to the lesson that wrote it. To run the code yourself, keep them in the same folder.
View the code here
support_bot.py
# the shop support bot: find the answer in the handbook, or say it is missing
HANDBOOK = {
    "a17": "Order A17 shipped on 3 March by courier.",
    "refund": "Refunds take five working days.",
}

def call_api(prompt, options, context):
    asked = prompt.lower()                      # the rendered prompt is the question
    for key, line in HANDBOOK.items():
        if key in asked:
            return {"output": line}
    return {"output": "I could not find that in the handbook."}
promptfooconfig.yaml
providers:
  - file://support_bot.py
prompts:
  - "{{question}}"
tests:
  - vars:
      question: Where is order A17?
    assert:
      - type: contains
        value: 3 March
  - vars:
      question: How long does a refund take?
    assert:
      - type: contains
        value: five working days

Listing the kept runs

After two evals have run, list evals prints them, one row each in the order they were made. The -n flag caps how many of the most recent runs to show. Here the two runs are made first, then listed.

ExampleThe two kept runs promptfoo saved
promptfoo list evals -n 5

Opening a run in the browser

promptfoo view starts a local web server, by default on port 15500, and opens the most recent run in a browser where you can click through every test, answer and score. It is a long-running server rather than a command that prints and exits, so it is shown here but not run.

bash
promptfoo view

What list evals shows

  • One row per kept run, in the order they ran, each with its eval id.
  • A prompts column holding a short hash of the prompt, the same for both runs because the config did not change.
  • A vars column naming the variables each run used, here the single question.
  • A description column, empty until a run is given one with --description.

Kept runs vs a single printout

A printed summaryThe kept database
Lives forUntil the terminal scrollsUntil you delete it
Reopen a past runNoYes, by id
Compare two runsBy eyeSide by side in the browser view

Where kept runs help

  • Checking whether a change helped, by comparing today's run with yesterday's.
  • Sharing a result, by opening the browser view instead of pasting terminal text.
  • Finding an old run you want to look at again, by its id.
Watch out. The limit flag is -n, a single dash. Writing --n is rejected with error: unknown option '--n'. The two-dash long form here is --n that does not exist, not a typo promptfoo forgives.
Try it yourself
  • Run a third eval and then promptfoo list evals -n 5; watch a third row appear.
  • Run promptfoo eval --description "first pass" and list again to see the description column fill.
  • Try promptfoo list evals --n 5 and read the error that the long form does not exist.

Every expert started right here.