Skip to main content

evaluation_rules

Creates, updates, deletes, gets or lists an evaluation_rules resource.

Overview

Nameevaluation_rules
TypeResource
Idazure.ai_projects.evaluation_rules

Fields

The following fields are returned by SELECT queries:

NameDatatypeDescription
idstringUnique identifier for the evaluation rule. Required.
actionobjectDefinition of the evaluation rule action. Required.
descriptionstringDescription for the evaluation rule.
displayNamestringDisplay Name for the evaluation rule.
enabledbooleanIndicates whether the evaluation rule is enabled. Default is true. Required.
eventTypestringEvent type that the evaluation rule applies to. Required. Known values are: "responseCompleted" and "manual". (responseCompleted, manual)
filterobjectFilter condition of the evaluation rule.
systemDataobjectSystem metadata for the evaluation rule. Required.

Methods

The following methods are available for this resource:

NameAccessible byRequired ParamsOptional ParamsDescription
getselectid, endpointGet an evaluation rule. Retrieves the specified evaluation rule and its configuration.
listselectendpointactionType, agentName, enabledList evaluation rules. Returns the evaluation rules configured for the project, optionally filtered by action type, agent name, or enabled state.
create_or_updateinsertid, endpoint, action, eventType, enabledCreate or update an evaluation rule. Creates a new evaluation rule, or replaces the existing rule when the identifier matches.
create_or_updatereplaceid, endpoint, action, eventType, enabledCreate or update an evaluation rule. Creates a new evaluation rule, or replaces the existing rule when the identifier matches.
deletedeleteid, endpointDelete an evaluation rule. Removes the specified evaluation rule from the project.

Parameters

Parameters can be passed in the WHERE clause of a query. Check the Methods section to see which parameters are required or optional for each operation.

NameDatatypeDescription
endpointstringThe service endpoint host (no scheme), e.g. myaccount.table.cosmos.azure.com:443 - value of the client endpoint parameter. (default: )
idstringUnique identifier for the evaluation rule. Required.
actionTypestringFilter by the type of evaluation rule. Known values are: "continuousEvaluation" and "humanEvaluationPreview". Default value is None.
agentNamestringFilter by the agent name. Default value is None.
enabledbooleanFilter by the enabled status. Default value is None.

SELECT examples

Get an evaluation rule. Retrieves the specified evaluation rule and its configuration.

SELECT
id,
action,
description,
displayName,
enabled,
eventType,
filter,
systemData
FROM azure.ai_projects.evaluation_rules
WHERE id = '{{ id }}' -- required
AND endpoint = '{{ endpoint }}' -- required
;

INSERT examples

Create or update an evaluation rule. Creates a new evaluation rule, or replaces the existing rule when the identifier matches.

INSERT INTO azure.ai_projects.evaluation_rules (
displayName,
description,
action,
filter,
eventType,
enabled,
id,
endpoint
)
SELECT
'{{ displayName }}',
'{{ description }}',
'{{ action }}' /* required */,
'{{ filter }}',
'{{ eventType }}' /* required */,
{{ enabled }} /* required */,
'{{ id }}',
'{{ endpoint }}'
RETURNING
id,
action,
description,
displayName,
enabled,
eventType,
filter,
systemData
;

REPLACE examples

Create or update an evaluation rule. Creates a new evaluation rule, or replaces the existing rule when the identifier matches.

REPLACE azure.ai_projects.evaluation_rules
SET
displayName = '{{ displayName }}',
description = '{{ description }}',
action = '{{ action }}',
filter = '{{ filter }}',
eventType = '{{ eventType }}',
enabled = {{ enabled }}
WHERE
id = '{{ id }}' --required
AND endpoint = '{{ endpoint }}' --required
AND action = '{{ action }}' --required
AND eventType = '{{ eventType }}' --required
AND enabled = {{ enabled }} --required
RETURNING
id,
action,
description,
displayName,
enabled,
eventType,
filter,
systemData;

DELETE examples

Delete an evaluation rule. Removes the specified evaluation rule from the project.

DELETE FROM azure.ai_projects.evaluation_rules
WHERE id = '{{ id }}' --required
AND endpoint = '{{ endpoint }}' --required
;