Skip to main content

experiments

Creates, updates, deletes, gets or lists a experiments resource.

Overview

Nameexperiments
TypeResource
Idgoogle.dialogflow.experiments

Fields

NameDatatypeDescription
namestringThe name of the experiment. Format: projects//locations//agents//environments//experiments/.
descriptionstringThe human-readable description of the experiment.
createTimestringCreation time of this experiment.
definitionobjectDefinition of the experiment.
displayNamestringRequired. The human-readable name of the experiment (unique in an environment). Limit of 64 characters.
endTimestringEnd time of this experiment.
experimentLengthstringMaximum number of days to run the experiment/rollout. If auto-rollout is not enabled, default value and maximum will be 30 days. If auto-rollout is enabled, default value and maximum will be 6 days.
lastUpdateTimestringLast update time of this experiment.
resultobjectThe inference result which includes an objective metric to optimize and the confidence interval.
rolloutConfigobjectThe configuration for auto rollout.
rolloutFailureReasonstringThe reason why rollout has failed. Should only be set when state is ROLLOUT_FAILED.
rolloutStateobjectState of the auto-rollout process.
startTimestringStart time of this experiment.
statestringThe current state of the experiment. Transition triggered by Experiments.StartExperiment: DRAFT->RUNNING. Transition triggered by Experiments.CancelExperiment: DRAFT->DONE or RUNNING->DONE.
variantsHistoryarrayThe history of updates to the experiment variants.

Methods

NameAccessible byRequired ParamsDescription
projects_locations_agents_environments_experiments_getSELECTagentsId, environmentsId, experimentsId, locationsId, projectsIdRetrieves the specified Experiment.
projects_locations_agents_environments_experiments_listSELECTagentsId, environmentsId, locationsId, projectsIdReturns the list of all experiments in the specified Environment.
projects_locations_agents_environments_experiments_createINSERTagentsId, environmentsId, locationsId, projectsIdCreates an Experiment in the specified Environment.
projects_locations_agents_environments_experiments_deleteDELETEagentsId, environmentsId, experimentsId, locationsId, projectsIdDeletes the specified Experiment.
projects_locations_agents_environments_experiments_patchUPDATEagentsId, environmentsId, experimentsId, locationsId, projectsIdUpdates the specified Experiment.
projects_locations_agents_environments_experiments_startEXECagentsId, environmentsId, experimentsId, locationsId, projectsIdStarts the specified Experiment. This rpc only changes the state of experiment from PENDING to RUNNING.
projects_locations_agents_environments_experiments_stopEXECagentsId, environmentsId, experimentsId, locationsId, projectsIdStops the specified Experiment. This rpc only changes the state of experiment from RUNNING to DONE.

SELECT examples

Returns the list of all experiments in the specified Environment.

SELECT
name,
description,
createTime,
definition,
displayName,
endTime,
experimentLength,
lastUpdateTime,
result,
rolloutConfig,
rolloutFailureReason,
rolloutState,
startTime,
state,
variantsHistory
FROM google.dialogflow.experiments
WHERE agentsId = '{{ agentsId }}'
AND environmentsId = '{{ environmentsId }}'
AND locationsId = '{{ locationsId }}'
AND projectsId = '{{ projectsId }}';

INSERT example

Use the following StackQL query and manifest file to create a new experiments resource.

/*+ create */
INSERT INTO google.dialogflow.experiments (
agentsId,
environmentsId,
locationsId,
projectsId,
name,
displayName,
description,
state,
definition,
rolloutConfig,
rolloutState,
rolloutFailureReason,
result,
startTime,
endTime,
lastUpdateTime,
experimentLength,
variantsHistory
)
SELECT
'{{ agentsId }}',
'{{ environmentsId }}',
'{{ locationsId }}',
'{{ projectsId }}',
'{{ name }}',
'{{ displayName }}',
'{{ description }}',
'{{ state }}',
'{{ definition }}',
'{{ rolloutConfig }}',
'{{ rolloutState }}',
'{{ rolloutFailureReason }}',
'{{ result }}',
'{{ startTime }}',
'{{ endTime }}',
'{{ lastUpdateTime }}',
'{{ experimentLength }}',
'{{ variantsHistory }}'
;

UPDATE example

Updates a experiments resource.

/*+ update */
UPDATE google.dialogflow.experiments
SET
name = '{{ name }}',
displayName = '{{ displayName }}',
description = '{{ description }}',
state = '{{ state }}',
definition = '{{ definition }}',
rolloutConfig = '{{ rolloutConfig }}',
rolloutState = '{{ rolloutState }}',
rolloutFailureReason = '{{ rolloutFailureReason }}',
result = '{{ result }}',
startTime = '{{ startTime }}',
endTime = '{{ endTime }}',
lastUpdateTime = '{{ lastUpdateTime }}',
experimentLength = '{{ experimentLength }}',
variantsHistory = '{{ variantsHistory }}'
WHERE
agentsId = '{{ agentsId }}'
AND environmentsId = '{{ environmentsId }}'
AND experimentsId = '{{ experimentsId }}'
AND locationsId = '{{ locationsId }}'
AND projectsId = '{{ projectsId }}';

DELETE example

Deletes the specified experiments resource.

/*+ delete */
DELETE FROM google.dialogflow.experiments
WHERE agentsId = '{{ agentsId }}'
AND environmentsId = '{{ environmentsId }}'
AND experimentsId = '{{ experimentsId }}'
AND locationsId = '{{ locationsId }}'
AND projectsId = '{{ projectsId }}';