Skip to content

Commit a2a9b2e

Browse files
authored
Merge branch 'release-build-ai-foundry' into rebrand-for-standard
2 parents a063140 + 06e53f4 commit a2a9b2e

File tree

41 files changed

+180
-142
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

41 files changed

+180
-142
lines changed

articles/ai-foundry/concepts/evaluation-evaluators/agent-evaluators.md

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,12 @@ Agents are powerful productivity assistants. They can plan, make decisions, and
1919

2020
Agents emit messages, and providing the above inputs typically require parsing messages and extracting the relevant information. If you're building agents using Azure AI Agent Service, we provide native integration for evaluation that directly takes their agent messages. To learn more, see an [end-to-end example of evaluating agents in Azure AI Agent Service](https://aka.ms/e2e-agent-eval-sample).
2121

22+
Besides `IntentResolution`, `ToolCallAccuracy`, `TaskAdherence` specific to agentic workflows, you can also assess other quality as well as safety aspects of your agentic workflows, leveraging out comprehensive suite of built-in evaluators. We support this list of evaluators for Azure AI agent messages from our converter:
23+
- **Quality**: `IntentResolution`, `ToolCallAccuracy`, `TaskAdherence`, `Relevance`, `Coherence`, `Fluency`
24+
- **Safety**: `CodeVulnerabilities`, `Violence`, `Self-harm`, `Sexual`, `HateUnfairness`, `IndirectAttack`, `ProtectedMaterials`.
25+
26+
We will show examples of `IntentResolution`, `ToolCallAccuracy`, `TaskAdherence` here. See more examples in [evaluating Azure AI agents](../../how-to/develop/agent-evaluate-sdk.md#evaluate-azure-ai-agents) for other evaluators with Azure AI agent message support.
27+
2228
## Model configuration for AI-assisted evaluators
2329

2430
For reference in the following code snippets, the AI-assisted evaluators use a model configuration for the LLM-judge:
@@ -37,6 +43,9 @@ model_config = AzureOpenAIModelConfiguration(
3743
)
3844
```
3945

46+
> [!TIP]
47+
> We recommend using `o3-mini` for a balance of reasoning capability and cost efficiency.
48+
4049
## Intent resolution
4150

4251
`IntentResolutionEvaluator` measures how well the system identifies and understands a user's request, including how well it scopes the user’s intent, asks clarifying questions, and reminds end users of its scope of capabilities. Higher score means better identification of user intent.
@@ -83,6 +92,9 @@ If you're building agents outside of Azure AI Agent Serice, this evaluator accep
8392

8493
`ToolCallAccuracyEvaluator` measures an agent's ability to select appropriate tools, extract, and process correct parameters from previous steps of the agentic workflow. It detects whether each tool call made is accurate (binary) and reports back the average scores, which can be interpreted as a passing rate across tool calls made.
8594

95+
> [!NOTE]
96+
> `ToolCallAccuracyEvaluator` only supports Azure AI Agent's Function Tool evaluation, but does not support Built-in Tool evaluation. The agent messages must have at least one Function Tool actually called to be evaluated.
97+
8698
### Tool call accuracy example
8799

88100
```python

articles/ai-foundry/concepts/evaluation-evaluators/general-purpose-evaluators.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -35,6 +35,9 @@ model_config = AzureOpenAIModelConfiguration(
3535
)
3636
```
3737

38+
> [!TIP]
39+
> We recommend using `o3-mini` for a balance of reasoning capability and cost efficiency.
40+
3841
## Coherence
3942

4043
`CoherenceEvaluator` measures the logical and orderly presentation of ideas in a response, allowing the reader to easily follow and understand the writer's train of thought. A coherent response directly addresses the question with clear connections between sentences and paragraphs, using appropriate transitions and a logical sequence of ideas. Higher scores mean better coherence.

articles/ai-foundry/concepts/evaluation-evaluators/rag-evaluators.md

Lines changed: 33 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -39,6 +39,9 @@ model_config = AzureOpenAIModelConfiguration(
3939
)
4040
```
4141

42+
> [!TIP]
43+
> We recommend using `o3-mini` for a balance of reasoning capability and cost efficiency.
44+
4245
## Retrieval
4346

4447
Retrieval quality is very important given its upstream role in RAG: if the retrieval quality is poor and the response requires corpus-specific knowledge, there's less chance your LLM model gives you a satisfactory answer. `RetrievalEvaluator` measures the **textual quality** of retrieval results with an LLM without requiring ground truth (also known as query relevance judgment), which provides value compared to `DocumentRetrievalEvaluator` measuring `ndcg`, `xdcg`, `fidelity`, and other classical information retrieval metrics that require ground truth. This metric focuses on how relevant the context chunks (encoded as a string) are to address a query and how the most relevant context chunks are surfaced at the top of the list.
@@ -90,69 +93,74 @@ Retrieval quality is very important given its upstream role in RAG: if the retri
9093
```python
9194
from azure.ai.evaluation import DocumentRetrievalEvaluator
9295

96+
# these query_relevance_label are given by your human- or LLM-judges.
9397
retrieval_ground_truth = [
9498
{
9599
"document_id": "1",
96-
"query_relevance_judgement": 4
100+
"query_relevance_label": 4
97101
},
98102
{
99103
"document_id": "2",
100-
"query_relevance_judgement": 2
104+
"query_relevance_label": 2
101105
},
102106
{
103107
"document_id": "3",
104-
"query_relevance_judgement": 3
108+
"query_relevance_label": 3
105109
},
106110
{
107111
"document_id": "4",
108-
"query_relevance_judgement": 1
112+
"query_relevance_label": 1
109113
},
110114
{
111115
"document_id": "5",
112-
"query_relevance_judgement": 0
116+
"query_relevance_label": 0
113117
},
114118
]
119+
# the min and max of the label scores are inputs to document retrieval evaluator
120+
ground_truth_label_min = 0
121+
ground_truth_label_max = 4
115122

123+
# these relevance scores come from your search retrieval system
116124
retrieved_documents = [
117125
{
118126
"document_id": "2",
119-
"query_relevance_judgement": 45.1
127+
"relevance_score": 45.1
120128
},
121129
{
122130
"document_id": "6",
123-
"query_relevance_judgement": 35.8
131+
"relevance_score": 35.8
124132
},
125133
{
126134
"document_id": "3",
127-
"query_relevance_judgement": 29.2
135+
"relevance_score": 29.2
128136
},
129137
{
130138
"document_id": "5",
131-
"query_relevance_judgement": 25.4
139+
"relevance_score": 25.4
132140
},
133141
{
134142
"document_id": "7",
135-
"query_relevance_judgement": 18.8
143+
"relevance_score": 18.8
136144
},
137145
]
138146

139-
default_threshold = {
140-
"ndcg@3": 0.5,
141-
"xdcg@3": 0.5,
142-
"fidelity": 0.5,
143-
"top1_relevance": 50,
144-
"top3_max_relevance": 50,
145-
"total_retrieved_documents": 50,
146-
"total_ground_truth_documents": 50,
147-
}
148-
149-
document_retrieval_evaluator = DocumentRetrievalEvaluator(threshold=default_threshold)
147+
document_retrieval_evaluator = DocumentRetrievalEvaluator(
148+
ground_truth_label_min=ground_truth_label_min,
149+
ground_truth_label_max=ground_truth_label_max,
150+
ndcg_threshold = 0.5,
151+
xdcg_threshold = 50.0,
152+
fidelity_threshold = 0.5,
153+
top1_relevance_threshold = 50.0,
154+
top3_max_relevance_threshold = 50.0,
155+
total_retrieved_documents_threshold = 50,
156+
total_ground_truth_documents_threshold = 50
157+
)
150158
document_retrieval_evaluator(retrieval_ground_truth=retrieval_ground_truth, retrieved_documents=retrieved_documents)
151159
```
152160

153161
### Document retrieval output
154162

155-
The numerical score on a likert scale (integer 1 to 5) and a higher score is better. Given a numerical threshold (default to 3), we also output "pass" if the score <= threshold, or "fail" otherwise. Using the reason field can help you understand why the score is high or low.
163+
All numerical scores have `high_is_better=True` except for `holes` and `holes_ratio` which have `high_is_better=False`. Given a numerical threshold (default to 3), we also output "pass" if the score <= threshold, or "fail" otherwise.
156164

157165
```python
158166
{
@@ -163,15 +171,16 @@ The numerical score on a likert scale (integer 1 to 5) and a higher score is bet
163171
"top3_max_relevance": 2,
164172
"holes": 30,
165173
"holes_ratio": 0.6000000000000001,
166-
"holes_is_higher_better": False,
167-
"holes_ratio_is_higher_better": False,
174+
"holes_higher_is_better": False,
175+
"holes_ratio_higher_is_better": False,
168176
"total_retrieved_documents": 50,
169177
"total_groundtruth_documents": 1565,
170178
"ndcg@3_result": "pass",
171179
"xdcg@3_result": "pass",
172180
"fidelity_result": "fail",
173181
"top1_relevance_result": "fail",
174182
"top3_max_relevance_result": "fail",
183+
# omitting more fields ...
175184
}
176185
```
177186

articles/ai-foundry/concepts/evaluation-evaluators/textual-similarity-evaluators.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,9 @@ model_config = AzureOpenAIModelConfiguration(
3333
)
3434
```
3535

36+
> [!TIP]
37+
> We recommend using `o3-mini` for a balance of reasoning capability and cost efficiency.
38+
3639
## Similarity
3740

3841
`SimilarityEvaluator` measures the degrees of semantic similarity between the generated text and its ground truth with respect to a query. Compared to other text-similarity metrics that require ground truths, this metric focuses on semantics of a response (instead of simple overlap in tokens or n-grams) and also considers the broader context of a query.

articles/ai-foundry/concepts/model-benchmarks.md

Lines changed: 17 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ Model leaderboards (preview) in Azure AI Foundry portal allow you to streamline
2727
Whenever you find a model to your liking, you can select it and zoom into the **Detailed benchmarking results** of the model within the model catalog. If satisfied with the model, you can deploy it, try it in the playground, or evaluate it on your data. The leaderboards support benchmarking across text language models (large language models (LLMs) and small language models (SLMs)) and embedding models.
2828

2929

30-
Model benchmarks assess LLMs and SLMs across the following categories: quality, performance, and cost. In addition, we assess the quality of embedding models using standard benchmarks. The benchmarks are updated regularly as better and more unsaturated datasets and associated metrics are added to existing models, and as new models are added to the model catalog.
30+
Model benchmarks assess LLMs and SLMs across the following categories: quality, performance, and cost. In addition, we assess the quality of embedding models using standard benchmarks. The leaderboards are updated regularly as better and more unsaturated benchmarks are onboarded, and as new models are added to the model catalog.
3131

3232

3333
## Quality benchmarks of language models
@@ -40,37 +40,33 @@ Azure AI assesses the quality of LLMs and SLMs using accuracy scores from standa
4040

4141
Quality index is provided on a scale of zero to one. Higher values of quality index are better. The datasets included in quality index are:
4242

43-
| Dataset name | Leaderboard category |
44-
|-------------------------|---------------------|
45-
| BoolQ | QA |
46-
| HellaSwag | Reasoning |
47-
| OpenBookQA | Reasoning |
48-
| PIQA | Reasoning |
49-
| Social IQA | Reasoning |
50-
| Winogrande | Reasoning |
51-
| TruthfulQA (MC) | Groundedness |
52-
| HumanEval | Coding |
53-
| GSM8K | Math |
54-
| MMLU (Humanities) | General Knowledge |
55-
| MMLU (Other) | General Knowledge |
56-
| MMLU (Social Sciences) | General Knowledge |
57-
| MMLU (STEM) | General Knowledge |
43+
| Dataset Name | Leaderboard Category |
44+
|--------------------|----------------------|
45+
| arena_hard | QA |
46+
| bigbench_hard | Reasoning |
47+
| gpqa | QA |
48+
| humanevalplus | Coding |
49+
| ifeval | Reasoning |
50+
| math | Math |
51+
| mbppplus | Coding |
52+
| mmlu_pro | General Knowledge |
53+
5854

5955

6056
See more details in accuracy scores:
6157

6258
| Metric | Description |
6359
|--------|--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
64-
| Accuracy | Accuracy scores are available at the dataset and the model levels. At the dataset level, the score is the average value of an accuracy metric computed over all examples in the dataset. The accuracy metric used is `exact-match` in all cases, except for the _HumanEval_  and _MBPP_ datasets that uses a `pass@1` metric. Exact match compares model generated text with the correct answer according to the dataset, reporting one if the generated text matches the answer exactly and zero otherwise. The `pass@1` metric measures the proportion of model solutions that pass a set of unit tests in a code generation task. At the model level, the accuracy score is the average of the dataset-level accuracies for each model. |
60+
| Accuracy | Accuracy scores are available at the dataset and the model levels. At the dataset level, the score is the average value of an accuracy metric computed over all examples in the dataset. The accuracy metric used is `exact-match` in all cases, except for the _HumanEval_  and _MBPP_ datasets that use a `pass@1` metric. Exact match compares model generated text with the correct answer according to the dataset, reporting one if the generated text matches the answer exactly and zero otherwise. The `pass@1` metric measures the proportion of model solutions that pass a set of unit tests in a code generation task. At the model level, the accuracy score is the average of the dataset-level accuracies for each model. |
6561

6662
Accuracy scores are provided on a scale of zero to one. Higher values are better.
6763

6864

6965
## Safety benchmarks of language models
7066

71-
Safety benchmarks use a standard metric Attack Success Rate to measure how vulerable language models are to attacks in biosecurity, cybersecurity, and chemical security. Currently, the [Weapons of Mass Destruction Proxy (WMDP) benchmark](https://www.wmdp.ai/) is used to assess hazardous knowledge in language models. The lower the Attack Success Rate is, the safer is the model response.
67+
Safety benchmarks use a standard metric Attack Success Rate to measure how vulnerable language models are to attacks in biosecurity, cybersecurity, and chemical security. Currently, the [Weapons of Mass Destruction Proxy (WMDP) benchmark](https://www.wmdp.ai/) is used to assess hazardous knowledge in language models. The lower the Attack Success Rate is, the safer is the model response.
7268

73-
All model endpoints are benchmarked with the default Azure AI Content Safety filters on with a default configuration. These safety filters detect and block [content harm categories](../../ai-services/content-safety/concepts/harm-categories.md) in violence, self-harm, sexual, hate and unfaireness, but do not measure categories in cybersecurity, biosecurity, chemical security.
69+
All model endpoints are benchmarked with the default Azure AI Content Safety filters on with a default configuration. These safety filters detect and block [content harm categories](../../ai-services/content-safety/concepts/harm-categories.md) in violence, self-harm, sexual, hate, and unfairness, but do not specifically cover categories in cybersecurity, biosecurity, chemical security.
7470

7571

7672
## Performance benchmarks of language models
@@ -135,7 +131,7 @@ Azure AI also displays the cost index as follows:
135131

136132
## Quality benchmarks of embedding models
137133

138-
The quality index of embedding models is defined as the averaged accuracy scores of a comprehensive set of standard benchmark datasests targeting Information Retrieval, Document Clustering, and Summarization tasks.
134+
The quality index of embedding models is defined as the averaged accuracy scores of a comprehensive set of standard benchmark datasets targeting Information Retrieval, Document Clustering, and Summarization tasks.
139135

140136
See more details in accuracy score definitions specific to each dataset:
141137

@@ -155,7 +151,7 @@ See more details in accuracy score definitions specific to each dataset:
155151

156152
Benchmark results originate from public datasets that are commonly used for language model evaluation. In most cases, the data is hosted in GitHub repositories maintained by the creators or curators of the data. Azure AI evaluation pipelines download data from their original sources, extract prompts from each example row, generate model responses, and then compute relevant accuracy metrics.
157153

158-
Prompt construction follows best practices for each dataset, as specified by the paper introducing the dataset and industry standards. In most cases, each prompt contains several _shots_, that is, several examples of complete questions and answers to prime the model for the task. The evaluation pipelines create shots by sampling questions and answers from a portion of the data that's held out from evaluation.
154+
Prompt construction follows best practices for each dataset, as specified by the paper introducing the dataset and industry standards. In most cases, each prompt contains several _shots_, that is, several examples of complete questions and answers to prime the model for the task. The evaluation pipelines create shots by sampling questions and answers from a portion of the data held out from evaluation.
159155

160156
## Related content
161157

0 commit comments

Comments
 (0)