Skip to content

Commit 53bc257

Browse files
Merge pull request #48462 from dotnet/main
Merge main into live
2 parents e33598c + 53d8d7d commit 53bc257

File tree

63 files changed

+232
-129
lines changed

Some content is hidden

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

63 files changed

+232
-129
lines changed

.openpublishing.redirection.ai.json

Lines changed: 33 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -2,15 +2,22 @@
22
"redirections": [
33
{
44
"source_path_from_root": "/docs/ai/ai-extensions.md",
5-
"redirect_url": "/dotnet/ai/microsoft-extensions-ai"
5+
"redirect_url": "/dotnet/ai/microsoft-extensions-ai",
6+
"redirect_document_id": true
67
},
78
{
89
"source_path_from_root": "/docs/ai/conceptual/agents.md",
910
"redirect_url": "/dotnet/ai"
1011
},
12+
{
13+
"source_path_from_root": "/docs/ai/conceptual/evaluation-libraries.md",
14+
"redirect_url": "/dotnet/ai/evaluation/libraries",
15+
"redirect_document_id": true
16+
},
1117
{
1218
"source_path_from_root": "/docs/ai/get-started/dotnet-ai-overview.md",
13-
"redirect_url": "/dotnet/ai/overview"
19+
"redirect_url": "/dotnet/ai/overview",
20+
"redirect_document_id": true
1421
},
1522
{
1623
"source_path_from_root": "/docs/ai/how-to/app-service-db-auth.md",
@@ -24,6 +31,11 @@
2431
"source_path_from_root": "/docs/ai/how-to/work-with-local-models.md",
2532
"redirect_url": "/dotnet/ai"
2633
},
34+
{
35+
"source_path_from_root": "/docs/ai/quickstarts/evaluate-ai-response.md",
36+
"redirect_url": "/dotnet/ai/evaluation/evaluate-ai-response",
37+
"redirect_document_id": true
38+
},
2739
{
2840
"source_path_from_root": "/docs/ai/quickstarts/get-started-azure-openai.md",
2941
"redirect_url": "/dotnet/ai/quickstarts/build-chat-app"
@@ -38,27 +50,41 @@
3850
},
3951
{
4052
"source_path_from_root": "/docs/ai/quickstarts/quickstart-assistants.md",
41-
"redirect_url": "/dotnet/ai/quickstarts/create-assistant"
53+
"redirect_url": "/dotnet/ai/quickstarts/create-assistant",
54+
"redirect_document_id": true
4255
},
4356
{
4457
"source_path_from_root": "/docs/ai/quickstarts/quickstart-azure-openai-tool.md",
4558
"redirect_url": "/dotnet/ai/quickstarts/use-function-calling"
4659
},
4760
{
4861
"source_path_from_root": "/docs/ai/quickstarts/quickstart-local-ai.md",
49-
"redirect_url": "/dotnet/ai/quickstarts/chat-local-model"
62+
"redirect_url": "/dotnet/ai/quickstarts/chat-local-model",
63+
"redirect_document_id": true
5064
},
5165
{
5266
"source_path_from_root": "/docs/ai/quickstarts/quickstart-openai-generate-images.md",
53-
"redirect_url": "/dotnet/ai/quickstarts/generate-images"
67+
"redirect_url": "/dotnet/ai/quickstarts/generate-images",
68+
"redirect_document_id": true
5469
},
5570
{
5671
"source_path_from_root": "/docs/ai/quickstarts/quickstart-openai-summarize-text.md",
57-
"redirect_url": "/dotnet/ai/quickstarts/prompt-model"
72+
"redirect_url": "/dotnet/ai/quickstarts/prompt-model",
73+
"redirect_document_id": true
5874
},
5975
{
6076
"source_path_from_root": "/docs/ai/tutorials/llm-eval.md",
61-
"redirect_url": "/dotnet/ai/quickstarts/evaluate-ai-response"
77+
"redirect_url": "/dotnet/ai/evaluation/evaluate-ai-response"
78+
},
79+
{
80+
"source_path_from_root": "/docs/ai/tutorials/evaluate-safety.md",
81+
"redirect_url": "/dotnet/ai/evaluation/evaluate-safety",
82+
"redirect_document_id": true
83+
},
84+
{
85+
"source_path_from_root": "/docs/ai/tutorials/evaluate-with-reporting.md",
86+
"redirect_url": "/dotnet/ai/evaluation/evaluate-with-reporting",
87+
"redirect_document_id": true
6288
}
6389
]
6490
}

.openpublishing.redirection.csharp.json

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@
4646
},
4747
{
4848
"source_path_from_root": "/redirections/proposals/csharp-7.2/conditional-ref.md",
49-
"redirect_url": "/dotnet/csharp/language-reference/language-specification/expressions#1218-conditional-operator"
49+
"redirect_url": "/dotnet/csharp/language-reference/language-specification/expressions#1219-conditional-operator"
5050
},
5151
{
5252
"source_path_from_root": "/redirections/proposals/csharp-7.2/non-trailing-named-arguments.md",
@@ -94,7 +94,7 @@
9494
},
9595
{
9696
"source_path_from_root": "/redirections/proposals/csharp-7.3/pattern-based-fixed.md",
97-
"redirect_url": "/dotnet/csharp/language-reference/language-specification/unsafe-code#237-the-fixed-statement"
97+
"redirect_url": "/dotnet/csharp/language-reference/language-specification/unsafe-code#247-the-fixed-statement"
9898
},
9999
{
100100
"source_path_from_root": "/redirections/proposals/csharp-7.3/ref-local-reassignment.md",
@@ -122,7 +122,7 @@
122122
},
123123
{
124124
"source_path_from_root": "/redirections/proposals/csharp-8.0/null-coalescing-assignment.md",
125-
"redirect_url": "/dotnet/csharp/language-reference/language-specification/expressions#1221-assignment-operators"
125+
"redirect_url": "/dotnet/csharp/language-reference/language-specification/expressions#1222-assignment-operators"
126126
},
127127
{
128128
"source_path_from_root": "/redirections/proposals/csharp-8.0/async-streams.md",

docfx.json

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -77,6 +77,7 @@
7777
"csharp-8.0/readonly-instance-members.md",
7878
"csharp-8.0/null-coalescing-assignment.md",
7979
"csharp-8.0/async-streams.md",
80+
"csharp-8.0/ranges.md",
8081
"csharp-9.0/nullable-reference-types-specification.md",
8182
"csharp-9.0/nullable-constructor-analysis.md",
8283
"csharp-9.0/nullable-parameter-default-value-analysis.md",
@@ -622,6 +623,7 @@
622623
"_csharpstandard/standard/classes.md": "Classes",
623624
"_csharpstandard/standard/structs.md": "Structs",
624625
"_csharpstandard/standard/arrays.md": "Arrays",
626+
"_csharpstandard/standard/ranges.md": "Indexes and ranges",
625627
"_csharpstandard/standard/interfaces.md": "Interfaces",
626628
"_csharpstandard/standard/enums.md": "Enums",
627629
"_csharpstandard/standard/delegates.md": "Delegates",
@@ -635,7 +637,6 @@
635637
"_csharpstandard/standard/Bibliography.md": "Bibliography",
636638
"_csharplang/proposals/csharp-8.0/patterns.md": "Recursive pattern matching",
637639
"_csharplang/proposals/csharp-8.0/default-interface-methods.md": "Default interface methods",
638-
"_csharplang/proposals/csharp-8.0/ranges.md": "Ranges and indices",
639640
"_csharplang/proposals/csharp-8.0/using.md": "Pattern based using and using declarations",
640641
"_csharplang/proposals/csharp-9.0/covariant-returns.md": "Covariant return types",
641642
"_csharplang/proposals/csharp-9.0/extending-partial-methods.md": "Extending partial methods",
@@ -749,7 +750,8 @@
749750
"_csharpstandard/standard/namespaces.md": "This chapter defines namespaces, including how to declare them and how to use them.",
750751
"_csharpstandard/standard/classes.md": "This chapter covers class declarations, including all member types that can be included in classes. This includes generic classes as well as non-generic classes.",
751752
"_csharpstandard/standard/structs.md": "This chapter defines struct declarations. In many cases, the descriptions are defined using the differences between classes and structs.",
752-
"_csharpstandard/standard/arrays.md": "This chapter defines arrays. It includes the rules for array variance, multi-dimensional arrays and jagged arrays.",
753+
"_csharpstandard/standard/arrays.md": "This chapter defines arrays. It includes the rules for array variance, multi-dimensional arrays, and jagged arrays.",
754+
"_csharpstandard/standard/ranges.md": "This chapter defines the index and range operators for indexing into arrays, strings, and spans.",
753755
"_csharpstandard/standard/interfaces.md": "This chapter defines interfaces. This includes interface declarations, implementing interfaces, and explicit interface implementation.",
754756
"_csharpstandard/standard/enums.md": "This chapter defines the enum types in C#. Enums create a set of named constants and are represented by an underlying integral set of values.",
755757
"_csharpstandard/standard/delegates.md": "This chapter defines delegates, which are objects that hold type safe function pointers.",
@@ -763,7 +765,6 @@
763765
"_csharpstandard/standard/Bibliography.md": "This appendix lists external standards referenced in this specification.",
764766
"_csharplang/proposals/csharp-8.0/patterns.md": "This feature specification describes recursive pattern matching, where patterns can nest inside other patterns.",
765767
"_csharplang/proposals/csharp-8.0/default-interface-methods.md": "This feature specification describe the syntax updates necessary to support default interface methods. This includes declaring bodies in interface declarations, and supporting modifiers on declarations.",
766-
"_csharplang/proposals/csharp-8.0/ranges.md": "This feature specification describes the syntax for ranges and indices, which support indexing individual elements of a sequence or a range of a sequence from the start or end of that sequence.",
767768
"_csharplang/proposals/csharp-8.0/using.md": "This feature specification supports pattern based using and using declarations to simplify resource cleanup.",
768769
"_csharplang/proposals/csharp-9.0/covariant-returns.md": "This feature specification describes covariant return types, where overriding member declarations can return a type derived from the overridden member declaration.",
769770
"_csharplang/proposals/csharp-9.0/extending-partial-methods.md": "This feature specification describes extensions to partial methods. These extensions enable source generators to create or call partial methods.",

docs/ai/quickstarts/evaluate-ai-response.md renamed to docs/ai/evaluation/evaluate-ai-response.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ ms.topic: quickstart
1010
In this quickstart, you create an MSTest app to evaluate the quality of a chat response from an OpenAI model. The test app uses the [Microsoft.Extensions.AI.Evaluation](https://www.nuget.org/packages/Microsoft.Extensions.AI.Evaluation) libraries.
1111

1212
> [!NOTE]
13-
> This quickstart demonstrates the simplest usage of the evaluation API. Notably, it doesn't demonstrate use of the [response caching](../conceptual/evaluation-libraries.md#cached-responses) and [reporting](../conceptual/evaluation-libraries.md#reporting) functionality, which are important if you're authoring unit tests that run as part of an "offline" evaluation pipeline. The scenario shown in this quickstart is suitable in use cases such as "online" evaluation of AI responses within production code and logging scores to telemetry, where caching and reporting aren't relevant. For a tutorial that demonstrates the caching and reporting functionality, see [Tutorial: Evaluate a model's response with response caching and reporting](../tutorials/evaluate-with-reporting.md)
13+
> This quickstart demonstrates the simplest usage of the evaluation API. Notably, it doesn't demonstrate use of the [response caching](libraries.md#cached-responses) and [reporting](libraries.md#reporting) functionality, which are important if you're authoring unit tests that run as part of an "offline" evaluation pipeline. The scenario shown in this quickstart is suitable in use cases such as "online" evaluation of AI responses within production code and logging scores to telemetry, where caching and reporting aren't relevant. For a tutorial that demonstrates the caching and reporting functionality, see [Tutorial: Evaluate a model's response with response caching and reporting](evaluate-with-reporting.md)
1414
1515
## Prerequisites
1616

@@ -103,4 +103,4 @@ If you no longer need them, delete the Azure OpenAI resource and GPT-4 model dep
103103
## Next steps
104104
105105
- Evaluate the responses from different OpenAI models.
106-
- Add response caching and reporting to your evaluation code. For more information, see [Tutorial: Evaluate a model's response with response caching and reporting](../tutorials/evaluate-with-reporting.md).
106+
- Add response caching and reporting to your evaluation code. For more information, see [Tutorial: Evaluate a model's response with response caching and reporting](evaluate-with-reporting.md).

docs/ai/tutorials/evaluate-safety.md renamed to docs/ai/evaluation/evaluate-safety.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -110,7 +110,7 @@ Complete the following steps to create an MSTest project.
110110
> [!NOTE]
111111
> This code example passes the LLM <xref:Microsoft.Extensions.AI.IChatClient> as `originalChatClient` to <xref:Microsoft.Extensions.AI.Evaluation.Safety.ContentSafetyServiceConfigurationExtensions.ToChatConfiguration(Microsoft.Extensions.AI.Evaluation.Safety.ContentSafetyServiceConfiguration,Microsoft.Extensions.AI.IChatClient)>. The reason to include the LLM chat client here is to enable getting a chat response from the LLM, and notably, to enable response caching for it. (If you don't want to cache the LLM's response, you can create a separate, local <xref:Microsoft.Extensions.AI.IChatClient> to fetch the response from the LLM.) Instead of passing a <xref:Microsoft.Extensions.AI.IChatClient>, if you already have a <xref:Microsoft.Extensions.AI.Evaluation.ChatConfiguration> for an LLM from another reporting configuration, you can pass that instead, using the <xref:Microsoft.Extensions.AI.Evaluation.Safety.ContentSafetyServiceConfigurationExtensions.ToChatConfiguration(Microsoft.Extensions.AI.Evaluation.Safety.ContentSafetyServiceConfiguration,Microsoft.Extensions.AI.Evaluation.ChatConfiguration)> overload.
112112
>
113-
> Similarly, if you configure both [LLM-based evaluators](../conceptual/evaluation-libraries.md#quality-evaluators) and [Azure AI Foundry Evaluation service&ndash;based evaluators](../conceptual/evaluation-libraries.md#safety-evaluators) in the reporting configuration, you also need to pass the LLM <xref:Microsoft.Extensions.AI.Evaluation.ChatConfiguration> to <xref:Microsoft.Extensions.AI.Evaluation.Safety.ContentSafetyServiceConfigurationExtensions.ToChatConfiguration(Microsoft.Extensions.AI.Evaluation.Safety.ContentSafetyServiceConfiguration,Microsoft.Extensions.AI.Evaluation.ChatConfiguration)>. Then it returns a <xref:Microsoft.Extensions.AI.Evaluation.ChatConfiguration> that can talk to both types of evaluators.
113+
> Similarly, if you configure both [LLM-based evaluators](libraries.md#quality-evaluators) and [Azure AI Foundry Evaluation service&ndash;based evaluators](libraries.md#safety-evaluators) in the reporting configuration, you also need to pass the LLM <xref:Microsoft.Extensions.AI.Evaluation.ChatConfiguration> to <xref:Microsoft.Extensions.AI.Evaluation.Safety.ContentSafetyServiceConfigurationExtensions.ToChatConfiguration(Microsoft.Extensions.AI.Evaluation.Safety.ContentSafetyServiceConfiguration,Microsoft.Extensions.AI.Evaluation.ChatConfiguration)>. Then it returns a <xref:Microsoft.Extensions.AI.Evaluation.ChatConfiguration> that can talk to both types of evaluators.
114114
115115
1. Add a method to define the [chat options](xref:Microsoft.Extensions.AI.ChatOptions) and ask the model for a response to a given question.
116116

@@ -148,6 +148,6 @@ To generate a report to view the evaluation results, see [Generate a report](eva
148148

149149
This tutorial covers the basics of evaluating content safety. As you create your test suite, consider the following next steps:
150150

151-
- Configure additional evaluators, such as the [quality evaluators](../conceptual/evaluation-libraries.md#quality-evaluators). For an example, see the AI samples repo [quality and safety evaluation example](https://github.com/dotnet/ai-samples/blob/main/src/microsoft-extensions-ai-evaluation/api/reporting/ReportingExamples.Example10_RunningQualityAndSafetyEvaluatorsTogether.cs).
151+
- Configure additional evaluators, such as the [quality evaluators](libraries.md#quality-evaluators). For an example, see the AI samples repo [quality and safety evaluation example](https://github.com/dotnet/ai-samples/blob/main/src/microsoft-extensions-ai-evaluation/api/reporting/ReportingExamples.Example10_RunningQualityAndSafetyEvaluatorsTogether.cs).
152152
- Evaluate the content safety of generated images. For an example, see the AI samples repo [image response example](https://github.com/dotnet/ai-samples/blob/main/src/microsoft-extensions-ai-evaluation/api/reporting/ReportingExamples.Example09_RunningSafetyEvaluatorsAgainstResponsesWithImages.cs).
153153
- In real-world evaluations, you might not want to validate individual results, since the LLM responses and evaluation scores can vary over time as your product (and the models used) evolve. You might not want individual evaluation tests to fail and block builds in your CI/CD pipelines when this happens. Instead, in such cases, it might be better to rely on the generated report and track the overall trends for evaluation scores across different scenarios over time (and only fail individual builds in your CI/CD pipelines when there's a significant drop in evaluation scores across multiple different tests).

docs/ai/tutorials/evaluate-with-reporting.md renamed to docs/ai/evaluation/evaluate-with-reporting.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -155,6 +155,9 @@ Run the test using your preferred test workflow, for example, by using the CLI c
155155
dotnet tool install --local Microsoft.Extensions.AI.Evaluation.Console
156156
```
157157

158+
> [!TIP]
159+
> You might need to create a manifest file first. For more information about that and installing local tools, see [Local tools](../../core/tools/dotnet-tool-install.md#local-tools).
160+
158161
1. Generate a report by running the following command:
159162

160163
```dotnetcli

0 commit comments

Comments
 (0)