experiments
Creates, updates, deletes, gets or lists a experiments
resource.
Overview
Name | experiments |
Type | Resource |
Id | google.dialogflow.experiments |
Fields
Name | Datatype | Description |
---|---|---|
name | string | The name of the experiment. Format: projects//locations//agents//environments//experiments/. |
description | string | The human-readable description of the experiment. |
createTime | string | Creation time of this experiment. |
definition | object | Definition of the experiment. |
displayName | string | Required. The human-readable name of the experiment (unique in an environment). Limit of 64 characters. |
endTime | string | End time of this experiment. |
experimentLength | string | Maximum 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. |
lastUpdateTime | string | Last update time of this experiment. |
result | object | The inference result which includes an objective metric to optimize and the confidence interval. |
rolloutConfig | object | The configuration for auto rollout. |
rolloutFailureReason | string | The reason why rollout has failed. Should only be set when state is ROLLOUT_FAILED. |
rolloutState | object | State of the auto-rollout process. |
startTime | string | Start time of this experiment. |
state | string | The current state of the experiment. Transition triggered by Experiments.StartExperiment: DRAFT->RUNNING. Transition triggered by Experiments.CancelExperiment: DRAFT->DONE or RUNNING->DONE. |
variantsHistory | array | The history of updates to the experiment variants. |
Methods
Name | Accessible by | Required Params | Description |
---|---|---|---|
projects_locations_agents_environments_experiments_get | SELECT | agentsId, environmentsId, experimentsId, locationsId, projectsId | Retrieves the specified Experiment. |
projects_locations_agents_environments_experiments_list | SELECT | agentsId, environmentsId, locationsId, projectsId | Returns the list of all experiments in the specified Environment. |
projects_locations_agents_environments_experiments_create | INSERT | agentsId, environmentsId, locationsId, projectsId | Creates an Experiment in the specified Environment. |
projects_locations_agents_environments_experiments_delete | DELETE | agentsId, environmentsId, experimentsId, locationsId, projectsId | Deletes the specified Experiment. |
projects_locations_agents_environments_experiments_patch | UPDATE | agentsId, environmentsId, experimentsId, locationsId, projectsId | Updates the specified Experiment. |
projects_locations_agents_environments_experiments_start | EXEC | agentsId, environmentsId, experimentsId, locationsId, projectsId | Starts the specified Experiment. This rpc only changes the state of experiment from PENDING to RUNNING. |
projects_locations_agents_environments_experiments_stop | EXEC | agentsId, environmentsId, experimentsId, locationsId, projectsId | Stops 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.
- All Properties
- Manifest
/*+ 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 }}'
;
- name: your_resource_model_name
props:
- name: name
value: string
- name: displayName
value: string
- name: description
value: string
- name: state
value: string
- name: definition
value:
- name: condition
value: string
- name: versionVariants
value:
- name: variants
value:
- - name: version
value: string
- name: trafficAllocation
value: number
- name: isControlGroup
value: boolean
- name: rolloutConfig
value:
- name: rolloutSteps
value:
- - name: displayName
value: string
- name: trafficPercent
value: integer
- name: minDuration
value: string
- name: rolloutCondition
value: string
- name: failureCondition
value: string
- name: rolloutState
value:
- name: step
value: string
- name: stepIndex
value: integer
- name: startTime
value: string
- name: rolloutFailureReason
value: string
- name: result
value:
- name: versionMetrics
value:
- - name: version
value: string
- name: metrics
value:
- - name: type
value: string
- name: countType
value: string
- name: ratio
value: number
- name: count
value: number
- name: confidenceInterval
value:
- name: confidenceLevel
value: number
- name: ratio
value: number
- name: lowerBound
value: number
- name: upperBound
value: number
- name: sessionCount
value: integer
- name: lastUpdateTime
value: string
- name: createTime
value: string
- name: startTime
value: string
- name: endTime
value: string
- name: lastUpdateTime
value: string
- name: experimentLength
value: string
- name: variantsHistory
value:
- - name: updateTime
value: string
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 }}';