Skip to main content
The Netra SDK exposes an evaluation client that lets you:
  • Manage datasets - Create datasets and add test items
  • Run test suites - Execute tasks against datasets with automatic tracing
  • Apply evaluators - Score outputs using built-in or custom evaluators
This page shows how to use netra.evaluation to manage datasets, run test suites, and programmatically evaluate your AI applications.

Getting Started

The evaluation client is available on the main Netra entry point after initialization.

createDataset

Create an empty dataset that can hold test items for evaluation runs.

Parameters

Response: CreateDatasetResponse


addDatasetItem

Add a single test item to an existing dataset.

Parameters

DatasetEntry

Response: AddDatasetItemResponse


getDataset

Retrieve a dataset and all its items by ID.

Parameters

Response: GetDatasetItemsResponse

DatasetRecord


runTestSuite

Execute a test suite against a dataset, running your task function on each item and optionally applying evaluators.

Parameters

Response

Item Result

The task function receives the input field from each dataset item. Return the output that should be compared against expectedOutput by evaluators.

When to Use Which API

Dataset Management

createDataset / addDatasetItem / getDatasetBuild and manage test datasets programmatically. Use for CI/CD pipelines or when generating test cases from production data.

Test Execution

runTestSuiteExecute your AI task against a dataset with automatic tracing and evaluation. Use for regression testing and model comparisons.

Advanced Workflows

createRunCreate runs without immediate execution. Use when you need custom orchestration or want to manage run lifecycle separately.

Evaluators

Evaluator IDs or ConfigsPass evaluator IDs to runTestSuite to automatically score outputs. Configure custom evaluators in the Netra dashboard.

Complete Example

Next Steps

Last modified on March 17, 2026