azure-ai-evaluation 1.0.0b2__py3-none-any.whl → 1.13.3__py3-none-any.whl
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Potentially problematic release.
This version of azure-ai-evaluation might be problematic. Click here for more details.
- azure/ai/evaluation/__init__.py +100 -5
- azure/ai/evaluation/{_evaluators/_chat → _aoai}/__init__.py +3 -2
- azure/ai/evaluation/_aoai/aoai_grader.py +140 -0
- azure/ai/evaluation/_aoai/label_grader.py +68 -0
- azure/ai/evaluation/_aoai/python_grader.py +86 -0
- azure/ai/evaluation/_aoai/score_model_grader.py +94 -0
- azure/ai/evaluation/_aoai/string_check_grader.py +66 -0
- azure/ai/evaluation/_aoai/text_similarity_grader.py +80 -0
- azure/ai/evaluation/_azure/__init__.py +3 -0
- azure/ai/evaluation/_azure/_clients.py +204 -0
- azure/ai/evaluation/_azure/_envs.py +207 -0
- azure/ai/evaluation/_azure/_models.py +227 -0
- azure/ai/evaluation/_azure/_token_manager.py +129 -0
- azure/ai/evaluation/_common/__init__.py +9 -1
- azure/ai/evaluation/{simulator/_helpers → _common}/_experimental.py +24 -9
- azure/ai/evaluation/_common/constants.py +131 -2
- azure/ai/evaluation/_common/evaluation_onedp_client.py +169 -0
- azure/ai/evaluation/_common/math.py +89 -0
- azure/ai/evaluation/_common/onedp/__init__.py +32 -0
- azure/ai/evaluation/_common/onedp/_client.py +166 -0
- azure/ai/evaluation/_common/onedp/_configuration.py +72 -0
- azure/ai/evaluation/_common/onedp/_model_base.py +1232 -0
- azure/ai/evaluation/_common/onedp/_patch.py +21 -0
- azure/ai/evaluation/_common/onedp/_serialization.py +2032 -0
- azure/ai/evaluation/_common/onedp/_types.py +21 -0
- azure/ai/evaluation/_common/onedp/_utils/__init__.py +6 -0
- azure/ai/evaluation/_common/onedp/_utils/model_base.py +1232 -0
- azure/ai/evaluation/_common/onedp/_utils/serialization.py +2032 -0
- azure/ai/evaluation/_common/onedp/_validation.py +66 -0
- azure/ai/evaluation/_common/onedp/_vendor.py +50 -0
- azure/ai/evaluation/_common/onedp/_version.py +9 -0
- azure/ai/evaluation/_common/onedp/aio/__init__.py +29 -0
- azure/ai/evaluation/_common/onedp/aio/_client.py +168 -0
- azure/ai/evaluation/_common/onedp/aio/_configuration.py +72 -0
- azure/ai/evaluation/_common/onedp/aio/_patch.py +21 -0
- azure/ai/evaluation/_common/onedp/aio/operations/__init__.py +49 -0
- azure/ai/evaluation/_common/onedp/aio/operations/_operations.py +7143 -0
- azure/ai/evaluation/_common/onedp/aio/operations/_patch.py +21 -0
- azure/ai/evaluation/_common/onedp/models/__init__.py +358 -0
- azure/ai/evaluation/_common/onedp/models/_enums.py +447 -0
- azure/ai/evaluation/_common/onedp/models/_models.py +5963 -0
- azure/ai/evaluation/_common/onedp/models/_patch.py +21 -0
- azure/ai/evaluation/_common/onedp/operations/__init__.py +49 -0
- azure/ai/evaluation/_common/onedp/operations/_operations.py +8951 -0
- azure/ai/evaluation/_common/onedp/operations/_patch.py +21 -0
- azure/ai/evaluation/_common/onedp/py.typed +1 -0
- azure/ai/evaluation/_common/onedp/servicepatterns/__init__.py +1 -0
- azure/ai/evaluation/_common/onedp/servicepatterns/aio/__init__.py +1 -0
- azure/ai/evaluation/_common/onedp/servicepatterns/aio/operations/__init__.py +25 -0
- azure/ai/evaluation/_common/onedp/servicepatterns/aio/operations/_operations.py +34 -0
- azure/ai/evaluation/_common/onedp/servicepatterns/aio/operations/_patch.py +20 -0
- azure/ai/evaluation/_common/onedp/servicepatterns/buildingblocks/__init__.py +1 -0
- azure/ai/evaluation/_common/onedp/servicepatterns/buildingblocks/aio/__init__.py +1 -0
- azure/ai/evaluation/_common/onedp/servicepatterns/buildingblocks/aio/operations/__init__.py +22 -0
- azure/ai/evaluation/_common/onedp/servicepatterns/buildingblocks/aio/operations/_operations.py +29 -0
- azure/ai/evaluation/_common/onedp/servicepatterns/buildingblocks/aio/operations/_patch.py +20 -0
- azure/ai/evaluation/_common/onedp/servicepatterns/buildingblocks/operations/__init__.py +22 -0
- azure/ai/evaluation/_common/onedp/servicepatterns/buildingblocks/operations/_operations.py +29 -0
- azure/ai/evaluation/_common/onedp/servicepatterns/buildingblocks/operations/_patch.py +20 -0
- azure/ai/evaluation/_common/onedp/servicepatterns/operations/__init__.py +25 -0
- azure/ai/evaluation/_common/onedp/servicepatterns/operations/_operations.py +34 -0
- azure/ai/evaluation/_common/onedp/servicepatterns/operations/_patch.py +20 -0
- azure/ai/evaluation/_common/rai_service.py +831 -142
- azure/ai/evaluation/_common/raiclient/__init__.py +34 -0
- azure/ai/evaluation/_common/raiclient/_client.py +128 -0
- azure/ai/evaluation/_common/raiclient/_configuration.py +87 -0
- azure/ai/evaluation/_common/raiclient/_model_base.py +1235 -0
- azure/ai/evaluation/_common/raiclient/_patch.py +20 -0
- azure/ai/evaluation/_common/raiclient/_serialization.py +2050 -0
- azure/ai/evaluation/_common/raiclient/_version.py +9 -0
- azure/ai/evaluation/_common/raiclient/aio/__init__.py +29 -0
- azure/ai/evaluation/_common/raiclient/aio/_client.py +130 -0
- azure/ai/evaluation/_common/raiclient/aio/_configuration.py +87 -0
- azure/ai/evaluation/_common/raiclient/aio/_patch.py +20 -0
- azure/ai/evaluation/_common/raiclient/aio/operations/__init__.py +25 -0
- azure/ai/evaluation/_common/raiclient/aio/operations/_operations.py +981 -0
- azure/ai/evaluation/_common/raiclient/aio/operations/_patch.py +20 -0
- azure/ai/evaluation/_common/raiclient/models/__init__.py +60 -0
- azure/ai/evaluation/_common/raiclient/models/_enums.py +18 -0
- azure/ai/evaluation/_common/raiclient/models/_models.py +651 -0
- azure/ai/evaluation/_common/raiclient/models/_patch.py +20 -0
- azure/ai/evaluation/_common/raiclient/operations/__init__.py +25 -0
- azure/ai/evaluation/_common/raiclient/operations/_operations.py +1238 -0
- azure/ai/evaluation/_common/raiclient/operations/_patch.py +20 -0
- azure/ai/evaluation/_common/raiclient/py.typed +1 -0
- azure/ai/evaluation/_common/utils.py +870 -34
- azure/ai/evaluation/_constants.py +167 -6
- azure/ai/evaluation/_converters/__init__.py +3 -0
- azure/ai/evaluation/_converters/_ai_services.py +899 -0
- azure/ai/evaluation/_converters/_models.py +467 -0
- azure/ai/evaluation/_converters/_sk_services.py +495 -0
- azure/ai/evaluation/_eval_mapping.py +83 -0
- azure/ai/evaluation/_evaluate/_batch_run/__init__.py +17 -0
- azure/ai/evaluation/_evaluate/_batch_run/_run_submitter_client.py +176 -0
- azure/ai/evaluation/_evaluate/_batch_run/batch_clients.py +82 -0
- azure/ai/evaluation/_evaluate/{_batch_run_client → _batch_run}/code_client.py +47 -25
- azure/ai/evaluation/_evaluate/{_batch_run_client/batch_run_context.py → _batch_run/eval_run_context.py} +42 -13
- azure/ai/evaluation/_evaluate/_batch_run/proxy_client.py +124 -0
- azure/ai/evaluation/_evaluate/_batch_run/target_run_context.py +62 -0
- azure/ai/evaluation/_evaluate/_eval_run.py +102 -59
- azure/ai/evaluation/_evaluate/_evaluate.py +2134 -311
- azure/ai/evaluation/_evaluate/_evaluate_aoai.py +992 -0
- azure/ai/evaluation/_evaluate/_telemetry/__init__.py +14 -99
- azure/ai/evaluation/_evaluate/_utils.py +289 -40
- azure/ai/evaluation/_evaluator_definition.py +76 -0
- azure/ai/evaluation/_evaluators/_bleu/_bleu.py +93 -42
- azure/ai/evaluation/_evaluators/_code_vulnerability/__init__.py +5 -0
- azure/ai/evaluation/_evaluators/_code_vulnerability/_code_vulnerability.py +119 -0
- azure/ai/evaluation/_evaluators/_coherence/_coherence.py +117 -91
- azure/ai/evaluation/_evaluators/_coherence/coherence.prompty +76 -39
- azure/ai/evaluation/_evaluators/_common/__init__.py +15 -0
- azure/ai/evaluation/_evaluators/_common/_base_eval.py +742 -0
- azure/ai/evaluation/_evaluators/_common/_base_multi_eval.py +63 -0
- azure/ai/evaluation/_evaluators/_common/_base_prompty_eval.py +345 -0
- azure/ai/evaluation/_evaluators/_common/_base_rai_svc_eval.py +198 -0
- azure/ai/evaluation/_evaluators/_common/_conversation_aggregators.py +49 -0
- azure/ai/evaluation/_evaluators/_content_safety/__init__.py +0 -4
- azure/ai/evaluation/_evaluators/_content_safety/_content_safety.py +144 -86
- azure/ai/evaluation/_evaluators/_content_safety/_hate_unfairness.py +138 -57
- azure/ai/evaluation/_evaluators/_content_safety/_self_harm.py +123 -55
- azure/ai/evaluation/_evaluators/_content_safety/_sexual.py +133 -54
- azure/ai/evaluation/_evaluators/_content_safety/_violence.py +134 -54
- azure/ai/evaluation/_evaluators/_document_retrieval/__init__.py +7 -0
- azure/ai/evaluation/_evaluators/_document_retrieval/_document_retrieval.py +442 -0
- azure/ai/evaluation/_evaluators/_eci/_eci.py +49 -56
- azure/ai/evaluation/_evaluators/_f1_score/_f1_score.py +102 -60
- azure/ai/evaluation/_evaluators/_fluency/_fluency.py +115 -92
- azure/ai/evaluation/_evaluators/_fluency/fluency.prompty +66 -41
- azure/ai/evaluation/_evaluators/_gleu/_gleu.py +90 -37
- azure/ai/evaluation/_evaluators/_groundedness/_groundedness.py +318 -82
- azure/ai/evaluation/_evaluators/_groundedness/groundedness_with_query.prompty +114 -0
- azure/ai/evaluation/_evaluators/_groundedness/groundedness_without_query.prompty +104 -0
- azure/ai/evaluation/{_evaluate/_batch_run_client → _evaluators/_intent_resolution}/__init__.py +3 -4
- azure/ai/evaluation/_evaluators/_intent_resolution/_intent_resolution.py +196 -0
- azure/ai/evaluation/_evaluators/_intent_resolution/intent_resolution.prompty +275 -0
- azure/ai/evaluation/_evaluators/_meteor/_meteor.py +107 -61
- azure/ai/evaluation/_evaluators/_protected_material/_protected_material.py +104 -77
- azure/ai/evaluation/_evaluators/_qa/_qa.py +115 -63
- azure/ai/evaluation/_evaluators/_relevance/_relevance.py +182 -98
- azure/ai/evaluation/_evaluators/_relevance/relevance.prompty +178 -49
- azure/ai/evaluation/_evaluators/_response_completeness/__init__.py +7 -0
- azure/ai/evaluation/_evaluators/_response_completeness/_response_completeness.py +202 -0
- azure/ai/evaluation/_evaluators/_response_completeness/response_completeness.prompty +84 -0
- azure/ai/evaluation/_evaluators/{_chat/retrieval → _retrieval}/__init__.py +2 -2
- azure/ai/evaluation/_evaluators/_retrieval/_retrieval.py +148 -0
- azure/ai/evaluation/_evaluators/_retrieval/retrieval.prompty +93 -0
- azure/ai/evaluation/_evaluators/_rouge/_rouge.py +189 -50
- azure/ai/evaluation/_evaluators/_service_groundedness/__init__.py +9 -0
- azure/ai/evaluation/_evaluators/_service_groundedness/_service_groundedness.py +179 -0
- azure/ai/evaluation/_evaluators/_similarity/_similarity.py +102 -91
- azure/ai/evaluation/_evaluators/_similarity/similarity.prompty +0 -5
- azure/ai/evaluation/_evaluators/_task_adherence/__init__.py +7 -0
- azure/ai/evaluation/_evaluators/_task_adherence/_task_adherence.py +226 -0
- azure/ai/evaluation/_evaluators/_task_adherence/task_adherence.prompty +101 -0
- azure/ai/evaluation/_evaluators/_task_completion/__init__.py +7 -0
- azure/ai/evaluation/_evaluators/_task_completion/_task_completion.py +177 -0
- azure/ai/evaluation/_evaluators/_task_completion/task_completion.prompty +220 -0
- azure/ai/evaluation/_evaluators/_task_navigation_efficiency/__init__.py +7 -0
- azure/ai/evaluation/_evaluators/_task_navigation_efficiency/_task_navigation_efficiency.py +384 -0
- azure/ai/evaluation/_evaluators/_tool_call_accuracy/__init__.py +9 -0
- azure/ai/evaluation/_evaluators/_tool_call_accuracy/_tool_call_accuracy.py +298 -0
- azure/ai/evaluation/_evaluators/_tool_call_accuracy/tool_call_accuracy.prompty +166 -0
- azure/ai/evaluation/_evaluators/_tool_input_accuracy/__init__.py +9 -0
- azure/ai/evaluation/_evaluators/_tool_input_accuracy/_tool_input_accuracy.py +263 -0
- azure/ai/evaluation/_evaluators/_tool_input_accuracy/tool_input_accuracy.prompty +76 -0
- azure/ai/evaluation/_evaluators/_tool_output_utilization/__init__.py +7 -0
- azure/ai/evaluation/_evaluators/_tool_output_utilization/_tool_output_utilization.py +225 -0
- azure/ai/evaluation/_evaluators/_tool_output_utilization/tool_output_utilization.prompty +221 -0
- azure/ai/evaluation/_evaluators/_tool_selection/__init__.py +9 -0
- azure/ai/evaluation/_evaluators/_tool_selection/_tool_selection.py +266 -0
- azure/ai/evaluation/_evaluators/_tool_selection/tool_selection.prompty +104 -0
- azure/ai/evaluation/_evaluators/_tool_success/__init__.py +7 -0
- azure/ai/evaluation/_evaluators/_tool_success/_tool_success.py +301 -0
- azure/ai/evaluation/_evaluators/_tool_success/tool_success.prompty +321 -0
- azure/ai/evaluation/_evaluators/_ungrounded_attributes/__init__.py +5 -0
- azure/ai/evaluation/_evaluators/_ungrounded_attributes/_ungrounded_attributes.py +102 -0
- azure/ai/evaluation/_evaluators/_xpia/xpia.py +109 -107
- azure/ai/evaluation/_exceptions.py +51 -7
- azure/ai/evaluation/_http_utils.py +210 -137
- azure/ai/evaluation/_legacy/__init__.py +3 -0
- azure/ai/evaluation/_legacy/_adapters/__init__.py +7 -0
- azure/ai/evaluation/_legacy/_adapters/_check.py +17 -0
- azure/ai/evaluation/_legacy/_adapters/_configuration.py +45 -0
- azure/ai/evaluation/_legacy/_adapters/_constants.py +10 -0
- azure/ai/evaluation/_legacy/_adapters/_errors.py +29 -0
- azure/ai/evaluation/_legacy/_adapters/_flows.py +28 -0
- azure/ai/evaluation/_legacy/_adapters/_service.py +16 -0
- azure/ai/evaluation/_legacy/_adapters/client.py +51 -0
- azure/ai/evaluation/_legacy/_adapters/entities.py +26 -0
- azure/ai/evaluation/_legacy/_adapters/tracing.py +28 -0
- azure/ai/evaluation/_legacy/_adapters/types.py +15 -0
- azure/ai/evaluation/_legacy/_adapters/utils.py +31 -0
- azure/ai/evaluation/_legacy/_batch_engine/__init__.py +9 -0
- azure/ai/evaluation/_legacy/_batch_engine/_config.py +48 -0
- azure/ai/evaluation/_legacy/_batch_engine/_engine.py +477 -0
- azure/ai/evaluation/_legacy/_batch_engine/_exceptions.py +88 -0
- azure/ai/evaluation/_legacy/_batch_engine/_openai_injector.py +132 -0
- azure/ai/evaluation/_legacy/_batch_engine/_result.py +107 -0
- azure/ai/evaluation/_legacy/_batch_engine/_run.py +127 -0
- azure/ai/evaluation/_legacy/_batch_engine/_run_storage.py +128 -0
- azure/ai/evaluation/_legacy/_batch_engine/_run_submitter.py +262 -0
- azure/ai/evaluation/_legacy/_batch_engine/_status.py +25 -0
- azure/ai/evaluation/_legacy/_batch_engine/_trace.py +97 -0
- azure/ai/evaluation/_legacy/_batch_engine/_utils.py +97 -0
- azure/ai/evaluation/_legacy/_batch_engine/_utils_deprecated.py +131 -0
- azure/ai/evaluation/_legacy/_common/__init__.py +3 -0
- azure/ai/evaluation/_legacy/_common/_async_token_provider.py +117 -0
- azure/ai/evaluation/_legacy/_common/_logging.py +292 -0
- azure/ai/evaluation/_legacy/_common/_thread_pool_executor_with_context.py +17 -0
- azure/ai/evaluation/_legacy/prompty/__init__.py +36 -0
- azure/ai/evaluation/_legacy/prompty/_connection.py +119 -0
- azure/ai/evaluation/_legacy/prompty/_exceptions.py +139 -0
- azure/ai/evaluation/_legacy/prompty/_prompty.py +430 -0
- azure/ai/evaluation/_legacy/prompty/_utils.py +663 -0
- azure/ai/evaluation/_legacy/prompty/_yaml_utils.py +99 -0
- azure/ai/evaluation/_model_configurations.py +130 -8
- azure/ai/evaluation/_safety_evaluation/__init__.py +3 -0
- azure/ai/evaluation/_safety_evaluation/_generated_rai_client.py +0 -0
- azure/ai/evaluation/_safety_evaluation/_safety_evaluation.py +917 -0
- azure/ai/evaluation/_user_agent.py +32 -1
- azure/ai/evaluation/_vendor/__init__.py +3 -0
- azure/ai/evaluation/_vendor/rouge_score/__init__.py +14 -0
- azure/ai/evaluation/_vendor/rouge_score/rouge_scorer.py +324 -0
- azure/ai/evaluation/_vendor/rouge_score/scoring.py +59 -0
- azure/ai/evaluation/_vendor/rouge_score/tokenize.py +59 -0
- azure/ai/evaluation/_vendor/rouge_score/tokenizers.py +53 -0
- azure/ai/evaluation/_version.py +2 -1
- azure/ai/evaluation/red_team/__init__.py +22 -0
- azure/ai/evaluation/red_team/_agent/__init__.py +3 -0
- azure/ai/evaluation/red_team/_agent/_agent_functions.py +261 -0
- azure/ai/evaluation/red_team/_agent/_agent_tools.py +461 -0
- azure/ai/evaluation/red_team/_agent/_agent_utils.py +89 -0
- azure/ai/evaluation/red_team/_agent/_semantic_kernel_plugin.py +228 -0
- azure/ai/evaluation/red_team/_attack_objective_generator.py +268 -0
- azure/ai/evaluation/red_team/_attack_strategy.py +49 -0
- azure/ai/evaluation/red_team/_callback_chat_target.py +115 -0
- azure/ai/evaluation/red_team/_default_converter.py +21 -0
- azure/ai/evaluation/red_team/_evaluation_processor.py +505 -0
- azure/ai/evaluation/red_team/_mlflow_integration.py +430 -0
- azure/ai/evaluation/red_team/_orchestrator_manager.py +803 -0
- azure/ai/evaluation/red_team/_red_team.py +1717 -0
- azure/ai/evaluation/red_team/_red_team_result.py +661 -0
- azure/ai/evaluation/red_team/_result_processor.py +1708 -0
- azure/ai/evaluation/red_team/_utils/__init__.py +37 -0
- azure/ai/evaluation/red_team/_utils/_rai_service_eval_chat_target.py +128 -0
- azure/ai/evaluation/red_team/_utils/_rai_service_target.py +601 -0
- azure/ai/evaluation/red_team/_utils/_rai_service_true_false_scorer.py +114 -0
- azure/ai/evaluation/red_team/_utils/constants.py +72 -0
- azure/ai/evaluation/red_team/_utils/exception_utils.py +345 -0
- azure/ai/evaluation/red_team/_utils/file_utils.py +266 -0
- azure/ai/evaluation/red_team/_utils/formatting_utils.py +365 -0
- azure/ai/evaluation/red_team/_utils/logging_utils.py +139 -0
- azure/ai/evaluation/red_team/_utils/metric_mapping.py +73 -0
- azure/ai/evaluation/red_team/_utils/objective_utils.py +46 -0
- azure/ai/evaluation/red_team/_utils/progress_utils.py +252 -0
- azure/ai/evaluation/red_team/_utils/retry_utils.py +218 -0
- azure/ai/evaluation/red_team/_utils/strategy_utils.py +218 -0
- azure/ai/evaluation/simulator/__init__.py +2 -1
- azure/ai/evaluation/simulator/_adversarial_scenario.py +26 -1
- azure/ai/evaluation/simulator/_adversarial_simulator.py +270 -144
- azure/ai/evaluation/simulator/_constants.py +12 -1
- azure/ai/evaluation/simulator/_conversation/__init__.py +151 -23
- azure/ai/evaluation/simulator/_conversation/_conversation.py +10 -6
- azure/ai/evaluation/simulator/_conversation/constants.py +1 -1
- azure/ai/evaluation/simulator/_data_sources/__init__.py +3 -0
- azure/ai/evaluation/simulator/_data_sources/grounding.json +1150 -0
- azure/ai/evaluation/simulator/_direct_attack_simulator.py +54 -75
- azure/ai/evaluation/simulator/_helpers/__init__.py +1 -2
- azure/ai/evaluation/simulator/_helpers/_language_suffix_mapping.py +1 -0
- azure/ai/evaluation/simulator/_helpers/_simulator_data_classes.py +26 -5
- azure/ai/evaluation/simulator/_indirect_attack_simulator.py +145 -104
- azure/ai/evaluation/simulator/_model_tools/__init__.py +2 -1
- azure/ai/evaluation/simulator/_model_tools/_generated_rai_client.py +225 -0
- azure/ai/evaluation/simulator/_model_tools/_identity_manager.py +80 -30
- azure/ai/evaluation/simulator/_model_tools/_proxy_completion_model.py +117 -45
- azure/ai/evaluation/simulator/_model_tools/_rai_client.py +109 -7
- azure/ai/evaluation/simulator/_model_tools/_template_handler.py +97 -33
- azure/ai/evaluation/simulator/_model_tools/models.py +30 -27
- azure/ai/evaluation/simulator/_prompty/task_query_response.prompty +6 -10
- azure/ai/evaluation/simulator/_prompty/task_simulate.prompty +6 -5
- azure/ai/evaluation/simulator/_simulator.py +302 -208
- azure/ai/evaluation/simulator/_utils.py +31 -13
- azure_ai_evaluation-1.13.3.dist-info/METADATA +939 -0
- azure_ai_evaluation-1.13.3.dist-info/RECORD +305 -0
- {azure_ai_evaluation-1.0.0b2.dist-info → azure_ai_evaluation-1.13.3.dist-info}/WHEEL +1 -1
- azure_ai_evaluation-1.13.3.dist-info/licenses/NOTICE.txt +70 -0
- azure/ai/evaluation/_evaluate/_batch_run_client/proxy_client.py +0 -71
- azure/ai/evaluation/_evaluators/_chat/_chat.py +0 -357
- azure/ai/evaluation/_evaluators/_chat/retrieval/_retrieval.py +0 -157
- azure/ai/evaluation/_evaluators/_chat/retrieval/retrieval.prompty +0 -48
- azure/ai/evaluation/_evaluators/_content_safety/_content_safety_base.py +0 -65
- azure/ai/evaluation/_evaluators/_content_safety/_content_safety_chat.py +0 -301
- azure/ai/evaluation/_evaluators/_groundedness/groundedness.prompty +0 -54
- azure/ai/evaluation/_evaluators/_protected_materials/__init__.py +0 -5
- azure/ai/evaluation/_evaluators/_protected_materials/_protected_materials.py +0 -104
- azure/ai/evaluation/simulator/_tracing.py +0 -89
- azure_ai_evaluation-1.0.0b2.dist-info/METADATA +0 -449
- azure_ai_evaluation-1.0.0b2.dist-info/RECORD +0 -99
- {azure_ai_evaluation-1.0.0b2.dist-info → azure_ai_evaluation-1.13.3.dist-info}/top_level.txt +0 -0
|
@@ -0,0 +1,447 @@
|
|
|
1
|
+
# coding=utf-8
|
|
2
|
+
# --------------------------------------------------------------------------
|
|
3
|
+
# Copyright (c) Microsoft Corporation. All rights reserved.
|
|
4
|
+
# Licensed under the MIT License. See License.txt in the project root for license information.
|
|
5
|
+
# Code generated by Microsoft (R) Python Code Generator.
|
|
6
|
+
# Changes may cause incorrect behavior and will be lost if the code is regenerated.
|
|
7
|
+
# --------------------------------------------------------------------------
|
|
8
|
+
|
|
9
|
+
from enum import Enum
|
|
10
|
+
from azure.core import CaseInsensitiveEnumMeta
|
|
11
|
+
|
|
12
|
+
|
|
13
|
+
class AttackStrategy(str, Enum, metaclass=CaseInsensitiveEnumMeta):
|
|
14
|
+
"""Strategies for attacks."""
|
|
15
|
+
|
|
16
|
+
EASY = "easy"
|
|
17
|
+
"""Represents a default set of easy complexity attacks. Easy complexity attacks require less
|
|
18
|
+
effort, such as translation of a prompt into some encoding, and does not require any Large
|
|
19
|
+
Language Model to convert or orchestrate."""
|
|
20
|
+
MODERATE = "moderate"
|
|
21
|
+
"""Represents a default set of moderate complexity attacks. Moderate complexity attacks require
|
|
22
|
+
having access to resources such as another generative AI model."""
|
|
23
|
+
DIFFICULT = "difficult"
|
|
24
|
+
"""Represents a default set of difficult complexity attacks. Difficult complexity attacks include
|
|
25
|
+
attacks that require access to significant resources and effort to execute an attack such as
|
|
26
|
+
knowledge of search-based algorithms in addition to a generative AI model."""
|
|
27
|
+
ASCII_ART = "ascii_art"
|
|
28
|
+
"""Generates visual art using ASCII characters, often used for creative or obfuscation purposes."""
|
|
29
|
+
ASCII_SMUGGLER = "ascii_smuggler"
|
|
30
|
+
"""Conceals data within ASCII characters, making it harder to detect."""
|
|
31
|
+
ATBASH = "atbash"
|
|
32
|
+
"""Implements the Atbash cipher, a simple substitution cipher where each letter is mapped to its
|
|
33
|
+
reverse."""
|
|
34
|
+
BASE64 = "base64"
|
|
35
|
+
"""Encodes binary data into a text format using Base64, commonly used for data transmission."""
|
|
36
|
+
BINARY = "binary"
|
|
37
|
+
"""Converts text into binary code, representing data in a series of 0s and 1s."""
|
|
38
|
+
CAESAR = "caesar"
|
|
39
|
+
"""Applies the Caesar cipher, a substitution cipher that shifts characters by a fixed number of
|
|
40
|
+
positions."""
|
|
41
|
+
CHARACTER_SPACE = "character_space"
|
|
42
|
+
"""Alters text by adding spaces between characters, often used for obfuscation."""
|
|
43
|
+
JAILBREAK = "jailbreak"
|
|
44
|
+
"""Injects specially crafted prompts to bypass AI safeguards, known as User Injected Prompt
|
|
45
|
+
Attacks (UPIA)."""
|
|
46
|
+
ANSII_ATTACK = "ansii_attack"
|
|
47
|
+
"""Utilizes ANSI escape sequences to manipulate text appearance and behavior."""
|
|
48
|
+
CHARACTER_SWAP = "character_swap"
|
|
49
|
+
"""Swaps characters within text to create variations or obfuscate the original content."""
|
|
50
|
+
SUFFIX_APPEND = "suffix_append"
|
|
51
|
+
"""Appends an adversarial suffix to the prompt."""
|
|
52
|
+
STRING_JOIN = "string_join"
|
|
53
|
+
"""Joins multiple strings together, often used for concatenation or obfuscation."""
|
|
54
|
+
UNICODE_CONFUSABLE = "unicode_confusable"
|
|
55
|
+
"""Uses Unicode characters that look similar to standard characters, creating visual confusion."""
|
|
56
|
+
UNICODE_SUBSTITUTION = "unicode_substitution"
|
|
57
|
+
"""Substitutes standard characters with Unicode equivalents, often for obfuscation."""
|
|
58
|
+
DIACRITIC = "diacritic"
|
|
59
|
+
"""Adds diacritical marks to characters, changing their appearance and sometimes their meaning."""
|
|
60
|
+
FLIP = "flip"
|
|
61
|
+
"""Flips characters from front to back, creating a mirrored effect."""
|
|
62
|
+
LEETSPEAK = "leetspeak"
|
|
63
|
+
"""Transforms text into Leetspeak, a form of encoding that replaces letters with similar-looking
|
|
64
|
+
numbers or symbols."""
|
|
65
|
+
ROT13 = "rot13"
|
|
66
|
+
"""Applies the ROT13 cipher, a simple substitution cipher that shifts characters by 13 positions."""
|
|
67
|
+
MORSE = "morse"
|
|
68
|
+
"""Encodes text into Morse code, using dots and dashes to represent characters."""
|
|
69
|
+
URL = "url"
|
|
70
|
+
"""Encodes text into URL format."""
|
|
71
|
+
BASELINE = "baseline"
|
|
72
|
+
"""Represents the baseline direct adversarial probing, which is used by attack strategies as the
|
|
73
|
+
attack objective."""
|
|
74
|
+
|
|
75
|
+
|
|
76
|
+
class ChatRole(str, Enum, metaclass=CaseInsensitiveEnumMeta):
|
|
77
|
+
"""A description of the intended purpose of a message within a chat completions interaction."""
|
|
78
|
+
|
|
79
|
+
SYSTEM = "system"
|
|
80
|
+
"""The role that instructs or sets the behavior of the assistant."""
|
|
81
|
+
DEVELOPER = "developer"
|
|
82
|
+
"""The role that provides instructions to the model prioritized ahead of user messages."""
|
|
83
|
+
USER = "user"
|
|
84
|
+
"""The role that provides input for chat completions."""
|
|
85
|
+
ASSISTANT = "assistant"
|
|
86
|
+
"""The role that provides responses to system-instructed, user-prompted input."""
|
|
87
|
+
TOOL = "tool"
|
|
88
|
+
"""The role that represents extension tool activity within a chat completions operation."""
|
|
89
|
+
|
|
90
|
+
|
|
91
|
+
class CompletionsFinishReason(str, Enum, metaclass=CaseInsensitiveEnumMeta):
|
|
92
|
+
"""Representation of the manner in which a completions response concluded."""
|
|
93
|
+
|
|
94
|
+
STOPPED = "stop"
|
|
95
|
+
"""Completions ended normally and reached its end of token generation."""
|
|
96
|
+
TOKEN_LIMIT_REACHED = "length"
|
|
97
|
+
"""Completions exhausted available token limits before generation could complete."""
|
|
98
|
+
CONTENT_FILTERED = "content_filter"
|
|
99
|
+
"""Completions generated a response that was identified as potentially sensitive per content
|
|
100
|
+
moderation policies."""
|
|
101
|
+
TOOL_CALLS = "tool_calls"
|
|
102
|
+
"""Completion ended with the model calling a provided tool for output."""
|
|
103
|
+
|
|
104
|
+
|
|
105
|
+
class ConnectionType(str, Enum, metaclass=CaseInsensitiveEnumMeta):
|
|
106
|
+
"""The Type (or category) of the connection."""
|
|
107
|
+
|
|
108
|
+
AZURE_OPEN_AI = "AzureOpenAI"
|
|
109
|
+
"""Azure OpenAI Service"""
|
|
110
|
+
AZURE_BLOB_STORAGE = "AzureBlob"
|
|
111
|
+
"""Azure Blob Storage, with specified container"""
|
|
112
|
+
AZURE_STORAGE_ACCOUNT = "AzureStorageAccount"
|
|
113
|
+
"""Azure Blob Storage, with container not specified (used by Agents)"""
|
|
114
|
+
AZURE_AI_SEARCH = "CognitiveSearch"
|
|
115
|
+
"""Azure AI Search"""
|
|
116
|
+
COSMOS_DB = "CosmosDB"
|
|
117
|
+
"""CosmosDB"""
|
|
118
|
+
API_KEY = "ApiKey"
|
|
119
|
+
"""Generic connection that uses API Key authentication"""
|
|
120
|
+
APPLICATION_CONFIGURATION = "AppConfig"
|
|
121
|
+
"""Application Configuration"""
|
|
122
|
+
APPLICATION_INSIGHTS = "AppInsights"
|
|
123
|
+
"""Application Insights"""
|
|
124
|
+
CUSTOM = "CustomKeys"
|
|
125
|
+
"""Custom Keys"""
|
|
126
|
+
|
|
127
|
+
|
|
128
|
+
class CredentialType(str, Enum, metaclass=CaseInsensitiveEnumMeta):
|
|
129
|
+
"""The credential type used by the connection."""
|
|
130
|
+
|
|
131
|
+
API_KEY = "ApiKey"
|
|
132
|
+
"""API Key credential"""
|
|
133
|
+
ENTRA_ID = "AAD"
|
|
134
|
+
"""Entra ID credential (formerly known as AAD)"""
|
|
135
|
+
SAS = "SAS"
|
|
136
|
+
"""Shared Access Signature (SAS) credential"""
|
|
137
|
+
CUSTOM = "CustomKeys"
|
|
138
|
+
"""Custom credential"""
|
|
139
|
+
NONE = "None"
|
|
140
|
+
"""No credential"""
|
|
141
|
+
|
|
142
|
+
|
|
143
|
+
class DatasetType(str, Enum, metaclass=CaseInsensitiveEnumMeta):
|
|
144
|
+
"""Enum to determine the type of data."""
|
|
145
|
+
|
|
146
|
+
URI_FILE = "uri_file"
|
|
147
|
+
"""URI file."""
|
|
148
|
+
URI_FOLDER = "uri_folder"
|
|
149
|
+
"""URI folder."""
|
|
150
|
+
|
|
151
|
+
|
|
152
|
+
class DayOfWeek(str, Enum, metaclass=CaseInsensitiveEnumMeta):
|
|
153
|
+
"""Days of the week for recurrence schedule."""
|
|
154
|
+
|
|
155
|
+
SUNDAY = "Sunday"
|
|
156
|
+
"""Sunday."""
|
|
157
|
+
MONDAY = "Monday"
|
|
158
|
+
"""Monday."""
|
|
159
|
+
TUESDAY = "Tuesday"
|
|
160
|
+
"""Tuesday."""
|
|
161
|
+
WEDNESDAY = "Wednesday"
|
|
162
|
+
"""Wednesday."""
|
|
163
|
+
THURSDAY = "Thursday"
|
|
164
|
+
"""Thursday."""
|
|
165
|
+
FRIDAY = "Friday"
|
|
166
|
+
"""Friday."""
|
|
167
|
+
SATURDAY = "Saturday"
|
|
168
|
+
"""Saturday."""
|
|
169
|
+
|
|
170
|
+
|
|
171
|
+
class DeploymentType(str, Enum, metaclass=CaseInsensitiveEnumMeta):
|
|
172
|
+
"""Type of DeploymentType."""
|
|
173
|
+
|
|
174
|
+
MODEL_DEPLOYMENT = "ModelDeployment"
|
|
175
|
+
"""Model deployment"""
|
|
176
|
+
|
|
177
|
+
|
|
178
|
+
class EvaluationRuleActionType(str, Enum, metaclass=CaseInsensitiveEnumMeta):
|
|
179
|
+
"""Type of the evaluation action."""
|
|
180
|
+
|
|
181
|
+
CONTINUOUS_EVALUATION = "continuousEvaluation"
|
|
182
|
+
"""Continuous evaluation."""
|
|
183
|
+
HUMAN_EVALUATION = "humanEvaluation"
|
|
184
|
+
"""Human evaluation."""
|
|
185
|
+
|
|
186
|
+
|
|
187
|
+
class EvaluationRuleEventType(str, Enum, metaclass=CaseInsensitiveEnumMeta):
|
|
188
|
+
"""Type of the evaluation rule event."""
|
|
189
|
+
|
|
190
|
+
RESPONSE_COMPLETED = "response.completed"
|
|
191
|
+
"""Response completed."""
|
|
192
|
+
MANUAL = "manual"
|
|
193
|
+
"""Manual trigger."""
|
|
194
|
+
|
|
195
|
+
|
|
196
|
+
class EvaluationTargetType(str, Enum, metaclass=CaseInsensitiveEnumMeta):
|
|
197
|
+
"""Allowed types of evaluation targets."""
|
|
198
|
+
|
|
199
|
+
MODEL_RESPONSE_GENERATION = "modelResponseGeneration"
|
|
200
|
+
"""Evaluation target that uses a model for response generation."""
|
|
201
|
+
|
|
202
|
+
|
|
203
|
+
class EvaluationTaxonomyInputType(str, Enum, metaclass=CaseInsensitiveEnumMeta):
|
|
204
|
+
"""Type of the evaluation taxonomy input."""
|
|
205
|
+
|
|
206
|
+
AGENT = "agent"
|
|
207
|
+
"""Agent"""
|
|
208
|
+
POLICY = "policy"
|
|
209
|
+
"""Policy."""
|
|
210
|
+
|
|
211
|
+
|
|
212
|
+
class EvaluatorCategory(str, Enum, metaclass=CaseInsensitiveEnumMeta):
|
|
213
|
+
"""The category of the evaluator."""
|
|
214
|
+
|
|
215
|
+
QUALITY = "quality"
|
|
216
|
+
"""Quality"""
|
|
217
|
+
SAFETY = "safety"
|
|
218
|
+
"""Risk & Safety"""
|
|
219
|
+
AGENTS = "agents"
|
|
220
|
+
"""Agents"""
|
|
221
|
+
|
|
222
|
+
|
|
223
|
+
class EvaluatorDefinitionType(str, Enum, metaclass=CaseInsensitiveEnumMeta):
|
|
224
|
+
"""The type of evaluator definition."""
|
|
225
|
+
|
|
226
|
+
PROMPT = "prompt"
|
|
227
|
+
"""Prompt-based definition"""
|
|
228
|
+
CODE = "code"
|
|
229
|
+
"""Code-based definition"""
|
|
230
|
+
PROMPT_AND_CODE = "prompt_and_code"
|
|
231
|
+
"""Prompt & Code Based definition"""
|
|
232
|
+
SERVICE = "service"
|
|
233
|
+
"""Service-based evaluator"""
|
|
234
|
+
OPENAI_GRADERS = "openai_graders"
|
|
235
|
+
"""OpenAI graders"""
|
|
236
|
+
|
|
237
|
+
|
|
238
|
+
class EvaluatorMetricDirection(str, Enum, metaclass=CaseInsensitiveEnumMeta):
|
|
239
|
+
"""The direction of the metric indicating whether a higher value is better, a lower value is
|
|
240
|
+
better, or neutral.
|
|
241
|
+
"""
|
|
242
|
+
|
|
243
|
+
INCREASE = "increase"
|
|
244
|
+
"""It indicates a higher value is better for this metric"""
|
|
245
|
+
DECREASE = "decrease"
|
|
246
|
+
"""It indicates a lower value is better for this metric"""
|
|
247
|
+
NEUTRAL = "neutral"
|
|
248
|
+
"""It indicates no preference for this metric direction"""
|
|
249
|
+
|
|
250
|
+
|
|
251
|
+
class EvaluatorMetricType(str, Enum, metaclass=CaseInsensitiveEnumMeta):
|
|
252
|
+
"""The type of the evaluator."""
|
|
253
|
+
|
|
254
|
+
ORDINAL = "ordinal"
|
|
255
|
+
"""Ordinal metric representing categories that can be ordered or ranked."""
|
|
256
|
+
CONTINUOUS = "continuous"
|
|
257
|
+
"""Continuous metric representing values in a continuous range."""
|
|
258
|
+
BOOLEAN = "boolean"
|
|
259
|
+
"""Boolean metric representing true/false values"""
|
|
260
|
+
|
|
261
|
+
|
|
262
|
+
class EvaluatorType(str, Enum, metaclass=CaseInsensitiveEnumMeta):
|
|
263
|
+
"""The type of the evaluator."""
|
|
264
|
+
|
|
265
|
+
BUILT_IN = "builtin"
|
|
266
|
+
"""Built-in evaluator (Microsoft provided)"""
|
|
267
|
+
CUSTOM = "custom"
|
|
268
|
+
"""Custom evaluator"""
|
|
269
|
+
|
|
270
|
+
|
|
271
|
+
class IndexType(str, Enum, metaclass=CaseInsensitiveEnumMeta):
|
|
272
|
+
"""Type of IndexType."""
|
|
273
|
+
|
|
274
|
+
AZURE_SEARCH = "AzureSearch"
|
|
275
|
+
"""Azure search"""
|
|
276
|
+
COSMOS_DB = "CosmosDBNoSqlVectorStore"
|
|
277
|
+
"""CosmosDB"""
|
|
278
|
+
MANAGED_AZURE_SEARCH = "ManagedAzureSearch"
|
|
279
|
+
"""Managed Azure Search"""
|
|
280
|
+
|
|
281
|
+
|
|
282
|
+
class InsightType(str, Enum, metaclass=CaseInsensitiveEnumMeta):
|
|
283
|
+
"""The request of the insights."""
|
|
284
|
+
|
|
285
|
+
EVALUATION_RUN_CLUSTER_INSIGHT = "EvaluationRunClusterInsight"
|
|
286
|
+
"""Insights on an Evaluation run result."""
|
|
287
|
+
AGENT_CLUSTER_INSIGHT = "AgentClusterInsight"
|
|
288
|
+
"""Cluster Insight on an Agent."""
|
|
289
|
+
EVALUATION_COMPARISON = "EvaluationComparison"
|
|
290
|
+
"""Evaluation Comparison."""
|
|
291
|
+
|
|
292
|
+
|
|
293
|
+
class ListViewType(str, Enum, metaclass=CaseInsensitiveEnumMeta):
|
|
294
|
+
"""List View Type Definition."""
|
|
295
|
+
|
|
296
|
+
ACTIVE_ONLY = "ActiveOnly"
|
|
297
|
+
"""List only active items."""
|
|
298
|
+
ARCHIVED_ONLY = "ArchivedOnly"
|
|
299
|
+
"""List only archived items."""
|
|
300
|
+
ALL = "All"
|
|
301
|
+
"""List all items."""
|
|
302
|
+
|
|
303
|
+
|
|
304
|
+
class OperationState(str, Enum, metaclass=CaseInsensitiveEnumMeta):
|
|
305
|
+
"""Enum describing allowed operation states."""
|
|
306
|
+
|
|
307
|
+
NOT_STARTED = "NotStarted"
|
|
308
|
+
"""The operation has not started."""
|
|
309
|
+
RUNNING = "Running"
|
|
310
|
+
"""The operation is in progress."""
|
|
311
|
+
SUCCEEDED = "Succeeded"
|
|
312
|
+
"""The operation has completed successfully."""
|
|
313
|
+
FAILED = "Failed"
|
|
314
|
+
"""The operation has failed."""
|
|
315
|
+
CANCELED = "Canceled"
|
|
316
|
+
"""The operation has been canceled by the user."""
|
|
317
|
+
|
|
318
|
+
|
|
319
|
+
class PendingUploadType(str, Enum, metaclass=CaseInsensitiveEnumMeta):
|
|
320
|
+
"""The type of pending upload."""
|
|
321
|
+
|
|
322
|
+
NONE = "None"
|
|
323
|
+
"""No pending upload."""
|
|
324
|
+
BLOB_REFERENCE = "BlobReference"
|
|
325
|
+
"""Blob Reference is the only supported type."""
|
|
326
|
+
TEMPORARY_BLOB_REFERENCE = "TemporaryBlobReference"
|
|
327
|
+
"""Temporary Blob Reference is the only supported type."""
|
|
328
|
+
|
|
329
|
+
|
|
330
|
+
class RecurrenceType(str, Enum, metaclass=CaseInsensitiveEnumMeta):
|
|
331
|
+
"""Recurrence type."""
|
|
332
|
+
|
|
333
|
+
HOURLY = "Hourly"
|
|
334
|
+
"""Hourly recurrence pattern."""
|
|
335
|
+
DAILY = "Daily"
|
|
336
|
+
"""Daily recurrence pattern."""
|
|
337
|
+
WEEKLY = "Weekly"
|
|
338
|
+
"""Weekly recurrence pattern."""
|
|
339
|
+
MONTHLY = "Monthly"
|
|
340
|
+
"""Monthly recurrence pattern."""
|
|
341
|
+
|
|
342
|
+
|
|
343
|
+
class ResultType(str, Enum, metaclass=CaseInsensitiveEnumMeta):
|
|
344
|
+
"""Type of Evaluation result."""
|
|
345
|
+
|
|
346
|
+
BENCHMARK = "Benchmark"
|
|
347
|
+
"""Benchmark result"""
|
|
348
|
+
EVALUATION = "Evaluation"
|
|
349
|
+
"""Evaluations Result"""
|
|
350
|
+
REDTEAM = "Redteam"
|
|
351
|
+
"""Red Team Result"""
|
|
352
|
+
SIMULATION = "Simulation"
|
|
353
|
+
"""Simulation Result"""
|
|
354
|
+
|
|
355
|
+
|
|
356
|
+
class RiskCategory(str, Enum, metaclass=CaseInsensitiveEnumMeta):
|
|
357
|
+
"""Risk category for the attack objective."""
|
|
358
|
+
|
|
359
|
+
HATE_UNFAIRNESS = "HateUnfairness"
|
|
360
|
+
"""Represents content related to hate or unfairness."""
|
|
361
|
+
VIOLENCE = "Violence"
|
|
362
|
+
"""Represents content related to violence."""
|
|
363
|
+
SEXUAL = "Sexual"
|
|
364
|
+
"""Represents content of a sexual nature."""
|
|
365
|
+
SELF_HARM = "SelfHarm"
|
|
366
|
+
"""Represents content related to self-harm."""
|
|
367
|
+
PROTECTED_MATERIAL = "ProtectedMaterial"
|
|
368
|
+
"""Represents content involving protected material."""
|
|
369
|
+
CODE_VULNERABILITY = "CodeVulnerability"
|
|
370
|
+
"""Represents content related to code vulnerabilities."""
|
|
371
|
+
UNGROUNDED_ATTRIBUTES = "UngroundedAttributes"
|
|
372
|
+
"""Represents content with ungrounded attributes."""
|
|
373
|
+
|
|
374
|
+
|
|
375
|
+
class SampleType(str, Enum, metaclass=CaseInsensitiveEnumMeta):
|
|
376
|
+
"""The type of sample used in the analysis."""
|
|
377
|
+
|
|
378
|
+
EVALUATION_RESULT_SAMPLE = "EvaluationResultSample"
|
|
379
|
+
"""A sample from the evaluation result."""
|
|
380
|
+
|
|
381
|
+
|
|
382
|
+
class ScheduleProvisioningStatus(str, Enum, metaclass=CaseInsensitiveEnumMeta):
|
|
383
|
+
"""Schedule provisioning status."""
|
|
384
|
+
|
|
385
|
+
CREATING = "Creating"
|
|
386
|
+
"""Represents the creation status of the schedule."""
|
|
387
|
+
UPDATING = "Updating"
|
|
388
|
+
"""Represents the updating status of the schedule."""
|
|
389
|
+
DELETING = "Deleting"
|
|
390
|
+
"""Represents the deleting status of the schedule."""
|
|
391
|
+
SUCCEEDED = "Succeeded"
|
|
392
|
+
"""Represents the succeeded status of the schedule."""
|
|
393
|
+
FAILED = "Failed"
|
|
394
|
+
"""Represents the failed status of the schedule."""
|
|
395
|
+
|
|
396
|
+
|
|
397
|
+
class ScheduleTaskType(str, Enum, metaclass=CaseInsensitiveEnumMeta):
|
|
398
|
+
"""Type of the task."""
|
|
399
|
+
|
|
400
|
+
EVALUATION = "Evaluation"
|
|
401
|
+
"""Evaluation task."""
|
|
402
|
+
INSIGHT = "Insight"
|
|
403
|
+
"""Insight task."""
|
|
404
|
+
|
|
405
|
+
|
|
406
|
+
class SimulationType(str, Enum, metaclass=CaseInsensitiveEnumMeta):
|
|
407
|
+
"""Simulation type."""
|
|
408
|
+
|
|
409
|
+
DEFAULT = "Default"
|
|
410
|
+
"""Default simulation type."""
|
|
411
|
+
CUSTOM_PERSONA = "CustomPersona"
|
|
412
|
+
"""Custom persona simulation type."""
|
|
413
|
+
HARM_TURN_GENERATOR = "HarmTurnGenerator"
|
|
414
|
+
"""Harm turn generator simulation type."""
|
|
415
|
+
|
|
416
|
+
|
|
417
|
+
class TargetType(str, Enum, metaclass=CaseInsensitiveEnumMeta):
|
|
418
|
+
"""Target type."""
|
|
419
|
+
|
|
420
|
+
AZURE_AI_AGENT = "AzureAIAgent"
|
|
421
|
+
"""Azure AI Agent Target"""
|
|
422
|
+
|
|
423
|
+
|
|
424
|
+
class TreatmentEffectType(str, Enum, metaclass=CaseInsensitiveEnumMeta):
|
|
425
|
+
"""Treatment Effect Type."""
|
|
426
|
+
|
|
427
|
+
TOO_FEW_SAMPLES = "TooFewSamples"
|
|
428
|
+
"""Not enough samples to determine treatment effect."""
|
|
429
|
+
INCONCLUSIVE = "Inconclusive"
|
|
430
|
+
"""No significant difference between treatment and baseline."""
|
|
431
|
+
CHANGED = "Changed"
|
|
432
|
+
"""Indicates the metric changed with statistical significance, but the direction is neutral."""
|
|
433
|
+
IMPROVED = "Improved"
|
|
434
|
+
"""Indicates the treatment significantly improved the metric compared to baseline."""
|
|
435
|
+
DEGRADED = "Degraded"
|
|
436
|
+
"""Indicates the treatment significantly degraded the metric compared to baseline."""
|
|
437
|
+
|
|
438
|
+
|
|
439
|
+
class TriggerType(str, Enum, metaclass=CaseInsensitiveEnumMeta):
|
|
440
|
+
"""Type of the trigger."""
|
|
441
|
+
|
|
442
|
+
CRON = "Cron"
|
|
443
|
+
"""Cron based trigger."""
|
|
444
|
+
RECURRENCE = "Recurrence"
|
|
445
|
+
"""Recurrence based trigger."""
|
|
446
|
+
ONE_TIME = "OneTime"
|
|
447
|
+
"""One-time trigger."""
|