Back to Promptfoo

eval-standalone-assertions (Standalone Assertions)

examples/eval-standalone-assertions/README.md

0.121.9736 B
Original Source

eval-standalone-assertions (Standalone Assertions)

You can run this example with:

bash
npx promptfoo@latest init --example eval-standalone-assertions
cd eval-standalone-assertions

To get started, have a look at asserts.yaml

If you use a model-graded eval, you must set your OPENAI_API_KEY environment variable or override the provider (see https://promptfoo.dev/docs/configuration/expected-outputs/model-graded/#overriding-the-llm-grader).

Then run:

bash
promptfoo eval --assertions asserts.yaml --model-outputs outputs.json

outputs-with-tags.json shows a different JSON format that allows you to show basic string metadata in the web UI view.

Afterwards, you can view the results by running promptfoo view