rai_svc
Creates, updates, deletes, gets or lists a rai_svc resource.
Overview
| Name | rai_svc |
| Type | Resource |
| Id | azure.ai_evaluation.rai_svc |
Fields
The following fields are returned by SELECT queries:
- get_jail_break_dataset_with_type
- get_template_parameters_image
- get_operation_result
- get_annotation
| Name | Datatype | Description |
|---|---|---|
value | string |
| Name | Datatype | Description |
|---|---|---|
value | string |
| Name | Datatype | Description |
|---|---|---|
value | string |
| Name | Datatype | Description |
|---|---|---|
value | string |
Methods
The following methods are available for this resource:
| Name | Accessible by | Required Params | Optional Params | Description |
|---|---|---|---|---|
get_jail_break_dataset_with_type | select | type_name, endpoint | Get the jailbreak dataset with type. | |
get_template_parameters_image | select | path, endpoint | Get the template parameters image. | |
get_operation_result | select | operation_id, endpoint | api-key, model-endpoint | Get the operation result. |
get_annotation | select | endpoint | Get the supported annotation tasks. | |
get_attack_objectives | exec | endpoint | lang, strategy, targetType | Get the attack objectives. |
get_jail_break_dataset | exec | endpoint | Get the jailbreak dataset. | |
get_template_parameters_with_type | exec | type_name, endpoint | Get template parameters with type. | |
get_template_parameters | exec | endpoint | Get template parameters. | |
submit_annotation | exec | endpoint, AnnotationTask, ContentType, UserTextList, Contents, MetricList, PromptVersion | Submit a request for annotation. | |
submit_simulation | exec | endpoint | Submit a request for simulation. | |
submit_aoai_evaluation | exec | endpoint, Data, ModelConfig, SampleGenerators, Graders | Submit a request for graders. |
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: ) |
operation_id | string | Operation id. Required. |
path | string | Image path. Required. |
type_name | string | Type for the template parameters. Required. |
api-key | string | Api key. Default value is None. |
lang | string | The language for the attack objectives dataset, defaults to 'en'. Default value is None. |
model-endpoint | string | Model Endpoint. Default value is None. |
strategy | string | The strategy. Default value is None. |
targetType | string | The target, model/agent. Default value is None. |
SELECT examples
- get_jail_break_dataset_with_type
- get_template_parameters_image
- get_operation_result
- get_annotation
Get the jailbreak dataset with type.
SELECT
value
FROM azure.ai_evaluation.rai_svc
WHERE type_name = '{{ type_name }}' -- required
AND endpoint = '{{ endpoint }}' -- required
;
Get the template parameters image.
SELECT
value
FROM azure.ai_evaluation.rai_svc
WHERE path = '{{ path }}' -- required
AND endpoint = '{{ endpoint }}' -- required
;
Get the operation result.
SELECT
value
FROM azure.ai_evaluation.rai_svc
WHERE operation_id = '{{ operation_id }}' -- required
AND endpoint = '{{ endpoint }}' -- required
AND api-key = '{{ api-key }}'
AND model-endpoint = '{{ model-endpoint }}'
;
Get the supported annotation tasks.
SELECT
value
FROM azure.ai_evaluation.rai_svc
WHERE endpoint = '{{ endpoint }}' -- required
;
Lifecycle Methods
- get_attack_objectives
- get_jail_break_dataset
- get_template_parameters_with_type
- get_template_parameters
- submit_annotation
- submit_simulation
- submit_aoai_evaluation
Get the attack objectives.
EXEC azure.ai_evaluation.rai_svc.get_attack_objectives
@endpoint='{{ endpoint }}' --required,
@lang='{{ lang }}',
@strategy='{{ strategy }}',
@targetType='{{ targetType }}'
;
Get the jailbreak dataset.
EXEC azure.ai_evaluation.rai_svc.get_jail_break_dataset
@endpoint='{{ endpoint }}' --required
;
Get template parameters with type.
EXEC azure.ai_evaluation.rai_svc.get_template_parameters_with_type
@type_name='{{ type_name }}' --required,
@endpoint='{{ endpoint }}' --required
;
Get template parameters.
EXEC azure.ai_evaluation.rai_svc.get_template_parameters
@endpoint='{{ endpoint }}' --required
;
Submit a request for annotation.
EXEC azure.ai_evaluation.rai_svc.submit_annotation
@endpoint='{{ endpoint }}' --required
@@json=
'{
"AnnotationTask": "{{ AnnotationTask }}",
"ContentType": "{{ ContentType }}",
"UserTextList": "{{ UserTextList }}",
"Contents": "{{ Contents }}",
"MetricList": "{{ MetricList }}",
"PromptVersion": "{{ PromptVersion }}"
}'
;
Submit a request for simulation.
EXEC azure.ai_evaluation.rai_svc.submit_simulation
@endpoint='{{ endpoint }}' --required
@@json=
'{
"Headers": "{{ Headers }}",
"Params": "{{ Params }}",
"TemplateParameters": "{{ TemplateParameters }}",
"CustomizationParameters": "{{ CustomizationParameters }}",
"Json": "{{ Json }}",
"Url": "{{ Url }}",
"TemplateKey": "{{ TemplateKey }}",
"SimulationType": "{{ SimulationType }}",
"IsMicrosoftTenant": {{ IsMicrosoftTenant }},
"SubscriptionId": "{{ SubscriptionId }}",
"ResourceGroupName": "{{ ResourceGroupName }}",
"WorkspaceName": "{{ WorkspaceName }}"
}'
;
Submit a request for graders.
EXEC azure.ai_evaluation.rai_svc.submit_aoai_evaluation
@endpoint='{{ endpoint }}' --required
@@json=
'{
"Data": "{{ Data }}",
"ModelConfig": "{{ ModelConfig }}",
"SampleGenerators": "{{ SampleGenerators }}",
"Graders": "{{ Graders }}"
}'
;