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:- Python
- C#
- JavaScript/TypeScript
- cURL
Provide data inline
For quick experimentation with small precomputed datasets, provide data directly in the evaluation request by usingfile_content.
- Python
- C#
- JavaScript/TypeScript
- cURL
source as the "source" field in your data source configuration when creating a run. The following dataset sections use file_id by default.
Source type support by dataset format
Both dataset formats support file and inline sources.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. Usedata_mapping to connect evaluator inputs to fields in your dataset by using {{item.field}} syntax. Include the inputs required by each evaluator, even when your dataset uses standard field names such as query, response, and ground_truth. For the required inputs 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.- Python
- C#
- JavaScript/TypeScript
- cURL
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.
- Python
- C#
- JavaScript/TypeScript
- cURL
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.
- For a complete .NET dataset example, see Sample2_EvaluationsWithDatasetId.md on GitHub.