Are you sure you want to delete this access key?
You can run this example with:
npx promptfoo@latest init --example csv-metadata
This example demonstrates how to use metadata columns in CSV test files to organize and filter your test cases. You can see more details on how to build a test cases CSV in the Promptfoo docs
promptfooconfig.yaml
: Configuration file with a simple prompt and provider setuptests.csv
: Test cases with metadata columns for categorization and filteringThe CSV file includes two types of metadata columns:
__metadata:category
- Single value metadata for broad categorization__metadata:tags[]
- Array metadata for multiple tags, with comma separation and escape supportBasic evaluation:
promptfoo eval
Filter by category:
promptfoo eval --filter-metadata category=technology
Filter by tags:
promptfoo eval --filter-metadata tags=ai
Note that array metadata values (tags) support escaped commas. For example, "global,warming" is treated as a single tag.
The example includes basic assertions using the __expected
column to verify outputs contain relevant keywords.
Press p or to see the previous file or, n or to see the next file
Browsing data directories saved to S3 is possible with DAGsHub. Let's configure your repository to easily display your data in the context of any commit!
promptfoo is now integrated with AWS S3!
Are you sure you want to delete this access key?
Browsing data directories saved to Google Cloud Storage is possible with DAGsHub. Let's configure your repository to easily display your data in the context of any commit!
promptfoo is now integrated with Google Cloud Storage!
Are you sure you want to delete this access key?
Browsing data directories saved to Azure Cloud Storage is possible with DAGsHub. Let's configure your repository to easily display your data in the context of any commit!
promptfoo is now integrated with Azure Cloud Storage!
Are you sure you want to delete this access key?
Browsing data directories saved to S3 compatible storage is possible with DAGsHub. Let's configure your repository to easily display your data in the context of any commit!
promptfoo is now integrated with your S3 compatible storage!
Are you sure you want to delete this access key?