evaluation_rules
Creates, updates, deletes, gets or lists an evaluation_rules resource.
Overview
| Name | evaluation_rules |
| Type | Resource |
| Id | azure.ai_projects.evaluation_rules |
Fields
The following fields are returned by SELECT queries:
- get
- list
| Name | Datatype | Description |
|---|---|---|
id | string | Unique identifier for the evaluation rule. Required. |
action | object | Definition of the evaluation rule action. Required. |
description | string | Description for the evaluation rule. |
displayName | string | Display Name for the evaluation rule. |
enabled | boolean | Indicates whether the evaluation rule is enabled. Default is true. Required. |
eventType | string | Event type that the evaluation rule applies to. Required. Known values are: "responseCompleted" and "manual". (responseCompleted, manual) |
filter | object | Filter condition of the evaluation rule. |
systemData | object | System metadata for the evaluation rule. Required. |
| Name | Datatype | Description |
|---|---|---|
id | string | Unique identifier for the evaluation rule. Required. |
action | object | Definition of the evaluation rule action. Required. |
description | string | Description for the evaluation rule. |
displayName | string | Display Name for the evaluation rule. |
enabled | boolean | Indicates whether the evaluation rule is enabled. Default is true. Required. |
eventType | string | Event type that the evaluation rule applies to. Required. Known values are: "responseCompleted" and "manual". (responseCompleted, manual) |
filter | object | Filter condition of the evaluation rule. |
systemData | object | System metadata for the evaluation rule. Required. |
Methods
The following methods are available for this resource:
| Name | Accessible by | Required Params | Optional Params | Description |
|---|---|---|---|---|
get | select | id, endpoint | Get an evaluation rule. Retrieves the specified evaluation rule and its configuration. | |
list | select | endpoint | actionType, agentName, enabled | List evaluation rules. Returns the evaluation rules configured for the project, optionally filtered by action type, agent name, or enabled state. |
create_or_update | insert | id, endpoint, action, eventType, enabled | Create or update an evaluation rule. Creates a new evaluation rule, or replaces the existing rule when the identifier matches. | |
create_or_update | replace | id, endpoint, action, eventType, enabled | Create or update an evaluation rule. Creates a new evaluation rule, or replaces the existing rule when the identifier matches. | |
delete | delete | id, endpoint | Delete 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.
| Name | Datatype | Description |
|---|---|---|
endpoint | string | The service endpoint host (no scheme), e.g. myaccount.table.cosmos.azure.com:443 - value of the client endpoint parameter. (default: ) |
id | string | Unique identifier for the evaluation rule. Required. |
actionType | string | Filter by the type of evaluation rule. Known values are: "continuousEvaluation" and "humanEvaluationPreview". Default value is None. |
agentName | string | Filter by the agent name. Default value is None. |
enabled | boolean | Filter by the enabled status. Default value is None. |
SELECT examples
- get
- list
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
;
List evaluation rules. Returns the evaluation rules configured for the project, optionally filtered by action type, agent name, or enabled state.
SELECT
id,
action,
description,
displayName,
enabled,
eventType,
filter,
systemData
FROM azure.ai_projects.evaluation_rules
WHERE endpoint = '{{ endpoint }}' -- required
AND actionType = '{{ actionType }}'
AND agentName = '{{ agentName }}'
AND enabled = '{{ enabled }}'
;
INSERT examples
- create_or_update
- Manifest
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
;
# Description fields are for documentation purposes
- name: evaluation_rules
props:
- name: id
value: "{{ id }}"
description: Required parameter for the evaluation_rules resource.
- name: endpoint
value: "{{ endpoint }}"
description: Required parameter for the evaluation_rules resource.
- name: displayName
value: "{{ displayName }}"
description: |
Display Name for the evaluation rule.
- name: description
value: "{{ description }}"
description: |
Description for the evaluation rule.
- name: action
description: |
Definition of the evaluation rule action. Required.
value:
type: "{{ type }}"
- name: filter
description: |
Filter condition of the evaluation rule.
value:
agentName: "{{ agentName }}"
- name: eventType
value: "{{ eventType }}"
description: |
Event type that the evaluation rule applies to. Required. Known values are: "responseCompleted" and "manual".
valid_values: ['responseCompleted', 'manual']
- name: enabled
value: {{ enabled }}
description: |
Indicates whether the evaluation rule is enabled. Default is true. Required.
REPLACE examples
- create_or_update
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
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
;