create_experiment
Creates an experiment to compare a candidate pipeline against a baseline, scoring both with one metric group over a dataset's test cases.
Instructions
Creates an Experiment that compares a candidate pipeline version against a baseline.
Both sides are scored by the same Metric Group over the test cases of one Dataset. The baseline
is either another pipeline version (give baseline_pipeline_name and
baseline_pipeline_version_id together) or Recorded (leave both unset): a Recorded baseline
reuses the Sessions each test case recorded, with nothing replayed. The candidate is always a
pipeline version that will be replayed on each test case.
Replaying runs the pipeline on the customer's models, so get a yes before creating when the
cost matters. sessions_per_test_case sets how many Sessions each side scores per test case
(1..50); existing Sessions on that version are reused and only the shortfall is replayed. Find
ids with list_metric_groups (metric groups) and list_experiments (an existing
Experiment's dataset_id). Read the running or finished Experiment with
get_experiment_results.
:param name: Human-readable name for the Experiment.
:param dataset_id: The Dataset's id (the UI's Dataset dropdown).
:param metric_group_id: The Metric Group id to score both sides with.
:param candidate_pipeline_name: Name of the candidate pipeline.
:param candidate_pipeline_version_id: The candidate pipeline version to replay.
:param baseline_pipeline_name: Baseline pipeline name; omit for a Recorded baseline.
:param baseline_pipeline_version_id: Baseline version id; required when baseline_pipeline_name is given.
:param sessions_per_test_case: Repetitions per test case (1..50, default 1).
:param replay_mode: FIRST_USER_MESSAGE replays the first turn only; ALL_USER_MESSAGES replays every turn.
:returns: The created Experiment, or an error message.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| name | Yes | ||
| dataset_id | Yes | ||
| replay_mode | No | FIRST_USER_MESSAGE | |
| metric_group_id | Yes | ||
| baseline_pipeline_name | No | ||
| sessions_per_test_case | No | ||
| candidate_pipeline_name | Yes | ||
| baseline_pipeline_version_id | No | ||
| candidate_pipeline_version_id | Yes |