Back to Promptfoo

eval-custom-grader-csv (Custom Grader Csv)

examples/eval-custom-grader-csv/README.md

0.121.9543 B
Original Source

eval-custom-grader-csv (Custom Grader Csv)

You can run this example with:

bash
npx promptfoo@latest init --example eval-custom-grader-csv
cd eval-custom-grader-csv

Usage

This example uses a custom assertion in customAssertion.ts and reads test cases from tests.csv. The __expected column in tests.csv points to this assertion script.

Run:

bash
promptfoo eval

Full command-line equivalent:

bash
promptfoo eval --prompts prompts.txt --tests tests.csv --providers openai:gpt-4.1-mini --output output.json