Prerequisites
- Complete the cloud evaluation prerequisites and client setup.
- A JSONL or CSV dataset with the fields required by your evaluators.
Prepare input data
Most evaluation scenarios require input data. You can provide data in two ways:Upload a dataset (recommended)
Upload a JSONL or CSV file to create a versioned dataset in your Foundry project. Datasets support versioning and reuse across multiple evaluation runs. Use this approach for production testing and CI/CD workflows. Prepare a JSONL file with one JSON object per line containing the fields your evaluators need:Provide data inline
For quick experimentation with small test sets—or for scenarios that require inline data, such as agent response evaluation—provide data directly in the evaluation request by usingfile_content. For agent response evaluations, file_content is the only supported source type.
source as the "source" field in your data source configuration when creating a run. The following scenario sections use file_id by default.
Source type support by scenario
Not all scenarios support both source types. The following matrix shows which source type each scenario supports.Evaluate a JSONL dataset
Evaluate precomputed responses in a JSONL file by using thejsonl data source type. This scenario is useful when you already have model outputs and want to assess their quality.
Define the data schema and evaluators
Specify the schema that matches your JSONL fields, and select the evaluators (testing criteria) to run. Use thedata_mapping parameter to connect fields from your input data to evaluator parameters by using {{item.field}} syntax. Always include data_mapping with the required input fields for each evaluator. Your field names must match those in your JSONL file. For example, if your data has "question" instead of "query", use "{{item.question}}" in the mapping. For the required parameters per evaluator, see built-in evaluators.
Create evaluation and run
Create the evaluation, and then start a run against your uploaded dataset. The run executes each evaluator on every row in the dataset.Evaluate a CSV dataset
Evaluate precomputed responses in a CSV file by using thecsv data source type. This scenario works the same way as dataset evaluation but accepts CSV files instead of JSONL. Use CSV when your data is already in spreadsheet or tabular format.
Prepare a CSV file
Create a CSV file with column headers that match the fields your evaluators need. Each row represents one test case.Upload and run
Upload the CSV file as a dataset. Then, create an evaluation by using thecsv data source type. The schema definition and evaluator configuration are the same as for JSONL evaluations. The only difference is the "type": "csv" in the data source.
Next steps
- To poll for completion and interpret results, see Get cloud evaluation results.
- For a complete runnable example, see sample_evaluations_builtin_with_csv.py on GitHub.