Skip to main content
Evaluate a dataset using a task function and a list of evaluators. This is the main entry point for running evaluation experiments. It creates an experiment, runs the evaluation task on all dataset items, and executes the specified evaluators to generate scores. The function automatically:
  1. Creates a new experiment with a unique name
  2. Runs the evaluation task on each dataset item
  3. Executes all evaluators on the task outputs
  4. Returns comprehensive results with timing and error information
Key Features:
  • Automatic Experiment Creation: Creates experiments with unique names
  • Task Execution: Runs custom evaluation tasks on dataset items
  • Evaluator Orchestration: Executes multiple evaluators on outputs
  • Error Handling: Gracefully handles task and evaluator failures
  • Result Collection: Returns detailed results with timing information
  • Flexible Configuration: Supports custom parameter mapping for evaluators
  • Concurrent Processing: Supports concurrent processing of dataset items
Use Cases:
  • Model Evaluation: Evaluate LLM models on test datasets
  • A/B Testing: Compare different model versions or configurations
  • Quality Assurance: Validate model performance across different inputs
  • Benchmarking: Run standardized evaluations on multiple models

Parameters

Dataset
required
The dataset containing test cases to evaluate.
Callable[[Dict[str, Any], Dict[str, Any], Dict[str, Any]], Dict[str, Any]]
required
Function that processes dataset items and returns outputs. Must accept (inputs, extras, metadata) and return dict of outputs.
list[Evaluator | Callable]
required
List of evaluators to run on task outputs. Can include both Evaluator instances and callable functions.
str | None
default:"None"
Optional prefix for the experiment name. If not provided, uses the dataset name as prefix. A unique ID is always appended.
str | None
default:"None"
Optional description for the experiment.
dict | None
default:"None"
Optional metadata dictionary for the experiment.
Dict[str, str | Callable[[Dict[str, Any]], Any]] | None
default:"None"
Optional evaluation-level mapping for transforming evaluator parameters. Maps parameter names to either string keys or transformation functions. This mapping has lower priority than evaluator-level mappings set in the evaluator constructor, allowing evaluators to define sensible defaults while still permitting customization at the evaluation level.
int
default:"1"
Maximum number of workers to use for concurrent processing. Use more than 1 only if the eval task function is thread-safe.

Returns

Contains the experiment and list of ScoredExperimentItem objects, each containing the experiment item data and scores for one dataset item.

Raises

  • ValueError – If dataset is empty or evaluators are invalid.
  • RuntimeError – If no connection is available for API calls.
  • ApiError – If there’s an error creating the experiment or communicating with the Fiddler API.

Example

The function processes dataset items sequentially. For large datasets, consider implementing parallel processing or batch processing strategies. The experiment name is automatically made unique by appending datetime.
Parameter Mapping Priority: When both evaluator-level and evaluation-level mappings are present, evaluator-level mappings take precedence. This allows evaluators to define sensible defaults while still permitting customization at the evaluation level. Mapping Priority (highest to lowest):
  1. Evaluator-level score_fn_kwargs_mapping (set in evaluator constructor)
  2. Evaluation-level score_fn_kwargs_mapping (passed to evaluate function)
  3. Default parameter resolution