Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
52 changes: 48 additions & 4 deletions .openpublishing.redirection.framework.json
Original file line number Diff line number Diff line change
Expand Up @@ -926,15 +926,15 @@
},
{
"source_path_from_root": "/docs/framework/deployment/windows/10.md",
"redirect_url": "/dotnet/framework/install/on-windows-10"
"redirect_url": "/dotnet/framework/install/on-windows-and-server"
},
{
"source_path_from_root": "/docs/framework/deployment/windows/7.md",
"redirect_url": "/previous-versions/dotnet/framework/install/on-windows-7"
},
{
"source_path_from_root": "/docs/framework/deployment/windows/8.md",
"redirect_url": "/dotnet/framework/install/on-windows-8"
"redirect_url": "/dotnet/framework/install/on-windows-and-server"
},
{
"source_path_from_root": "/docs/framework/deployment/windows/index.md",
Expand Down Expand Up @@ -985,6 +985,34 @@
"redirect_url": "/previous-versions/dotnet/framework/install/on-windows-7",
"redirect_document_id": false
},
{
"source_path_from_root": "/docs/framework/install/on-windows-8.md",
"redirect_url": "/dotnet/framework/install/on-windows-and-server"
},
{
"source_path_from_root": "/docs/framework/install/on-windows-8-1.md",
"redirect_url": "/dotnet/framework/install/on-windows-and-server"
},
{
"source_path_from_root": "/docs/framework/install/on-windows-10.md",
"redirect_url": "/dotnet/framework/install/on-windows-and-server"
},
{
"source_path_from_root": "/docs/framework/install/on-windows-11.md",
"redirect_url": "/dotnet/framework/install/on-windows-and-server"
},
{
"source_path_from_root": "/docs/framework/install/on-server-2019.md",
"redirect_url": "/dotnet/framework/install/on-windows-and-server"
},
{
"source_path_from_root": "/docs/framework/install/on-server-2022.md",
"redirect_url": "/dotnet/framework/install/on-windows-and-server"
},
{
"source_path_from_root": "/docs/framework/install/on-server-2025.md",
"redirect_url": "/dotnet/framework/install/on-windows-and-server"
},
{
"source_path_from_root": "/docs/framework/install/on-windows-vista.md",
"redirect_url": "/previous-versions/dotnet/framework/install/on-windows-vista",
Expand All @@ -995,6 +1023,10 @@
"redirect_url": "/previous-versions/dotnet/framework/install/on-windows-xp",
"redirect_document_id": false
},
{
"source_path_from_root": "/docs/framework/install/run-net-framework-1-1-apps.md",
"redirect_url": "/dotnet/framework/install/dotnet-35-windows"
},
{
"source_path_from_root": "/docs/framework/interop/applying-interop-attributes.md",
"redirect_url": "/dotnet/standard/native-interop/apply-interop-attributes",
Expand Down Expand Up @@ -1113,6 +1145,14 @@
"source_path_from_root": "/docs/framework/migration-guide/application-compatibility-in-the-net-framework-4-7.md",
"redirect_url": "/dotnet/framework/migration-guide/application-compatibility"
},
{
"source_path_from_root": "/docs/framework/migration-guide/how-to-determine-which-versions-are-installed.md",
"redirect_url": "/dotnet/framework/install/how-to-determine-which-versions-are-installed"
},
{
"source_path_from_root": "/docs/framework/migration-guide/how-to-determine-which-net-framework-updates-are-installed.md",
"redirect_url": "/dotnet/framework/install/how-to-determine-which-net-framework-updates-are-installed"
},
{
"source_path_from_root": "/docs/framework/migration-guide/migration-guide/mitigation-culture-and-asynchronous-operations.md",
"redirect_url": "/dotnet/framework/migration-guide/retargeting/4.6.x"
Expand Down Expand Up @@ -1151,7 +1191,7 @@
},
{
"source_path_from_root": "/docs/framework/migration-guide/minimum-release-dword.md",
"redirect_url": "/dotnet/framework/migration-guide/how-to-determine-which-versions-are-installed"
"redirect_url": "/dotnet/framework/install/how-to-determine-which-versions-are-installed"
},
{
"source_path_from_root": "/docs/framework/migration-guide/mitigation-claimsidentity-constructor.md",
Expand All @@ -1167,7 +1207,7 @@
},
{
"source_path_from_root": "/docs/framework/migration-guide/release-keys-and-os-versions.md",
"redirect_url": "/dotnet/framework/migration-guide/how-to-determine-which-versions-are-installed"
"redirect_url": "/dotnet/framework/install/how-to-determine-which-versions-are-installed"
},
{
"source_path_from_root": "/docs/framework/migration-guide/retargeting-changes-in-the-net-framework-4-5-1.md",
Expand Down Expand Up @@ -1673,6 +1713,10 @@
"source_path_from_root": "/docs/framework/migration-guide/runtime/index.md",
"redirect_url": "/dotnet/framework/migration-guide/application-compatibility"
},
{
"source_path_from_root": "/docs/framework/migration-guide/versions-and-dependencies.md",
"redirect_url": "/dotnet/framework/install/versions-and-dependencies"
},
{
"source_path_from_root": "/docs/framework/misc/binding.md",
"redirect_url": "/dotnet/framework/configure-apps/file-schema/wcf/bindings"
Expand Down
11 changes: 6 additions & 5 deletions docfx.json
Original file line number Diff line number Diff line change
Expand Up @@ -323,11 +323,11 @@
"_csharpstandard/**/*.md": "billwagner",
"_roslyn/docs/compilers/CSharp/*.md": "billwagner",
"_vblang/spec/*.md": "billwagner",
"docs/azure/**/*.*": "alexwolfmsft",
"docs/orleans/**/*.*": "IEvangelist",
"docs/ai/**/*.*": "gewarren",
"docs/architecture/**/**.md": "jamesmontemagno",
"docs/architecture/grpc-for-wcf-developers/**/**.md": "JamesNK",
"docs/architecture/modernize-desktop/**/**.md": "OliaG",
"docs/azure/**/*.*": "alexwolfmsft",
"docs/core/**/**.md": "gewarren",
"docs/core/compatibility/**/**.md": "camsoper",
"docs/core/deploying/**/**.md": "adegeo",
Expand Down Expand Up @@ -377,7 +377,8 @@
"docs/fundamentals/runtime-libraries/**/**.md": "gewarren",
"docs/fundamentals/syslib-diagnostics/**/**.md": "gewarren",
"docs/iot/**/*.*": "camsoper",
"docs/machine-learning/**/**.md": "luisquintanilla",
"docs/machine-learning/**/**.md": "gewarren",
"docs/orleans/**/*.*": "IEvangelist",
"docs/standard/**/**.md": "gewarren",
"docs/standard/analyzers/**/**.md": "IEvangelist",
"docs/standard/assembly/**/**.md": "IEvangelist",
Expand Down Expand Up @@ -414,7 +415,7 @@
"_csharpstandard/**/*.md": "wiwagn",
"_roslyn/docs/compilers/CSharp/*.md": "wiwagn",
"_vblang/spec/*.md": "wiwagn",
"docs/ai/**/*.*": "alexwolf",
"docs/ai/**/*.*": "gewarren",
"docs/architecture/**/**.md": "jamont",
"docs/architecture/grpc-for-wcf-developers/**/**.md": "jamesnk",
"docs/architecture/modernize-desktop/**/**.md": "oliag",
Expand Down Expand Up @@ -466,7 +467,7 @@
"docs/fundamentals/runtime-libraries/**/**.md": "gewarren",
"docs/fundamentals/syslib-diagnostics/**/**.md": "gewarren",
"docs/iot/**/*.*": "casoper",
"docs/machine-learning/**/**.md": "luquinta",
"docs/machine-learning/**/**.md": "gewarren",
"docs/standard/**/**.md": "gewarren",
"docs/standard/analyzers/**/**.md": "dapine",
"docs/standard/assembly/**/**.md": "dapine",
Expand Down
59 changes: 59 additions & 0 deletions docs/ai/conceptual/evaluation-libraries.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,59 @@
---
title: The Microsoft.Extensions.AI.Evaluation libraries
description: Learn about the Microsoft.Extensions.AI.Evaluation libraries, which simplify the process of evaluating the quality and accuracy of responses generated by AI models in .NET intelligent apps.
ms.topic: concept-article
ms.date: 02/19/2025
---
# The Microsoft.Extensions.AI.Evaluation libraries (Preview)

The Microsoft.Extensions.AI.Evaluation libraries (currently in preview) simplify the process of evaluating the quality and accuracy of responses generated by AI models in .NET intelligent apps. Various metrics measure aspects like relevance, truthfulness, coherence, and completeness of the responses. Evaluations are crucial in testing, because they help ensure that the AI model performs as expected and provides reliable and accurate results.

The evaluation libraries, which are built on top of the [Microsoft.Extensions.AI abstractions](../ai-extensions.md), are composed of the following NuGet packages:

- [📦 Microsoft.Extensions.AI.Evaluation](https://www.nuget.org/packages/Microsoft.Extensions.AI.Evaluation) – Defines the core abstractions and types for supporting evaluation.
- [📦 Microsoft.Extensions.AI.Evaluation.Quality](https://www.nuget.org/packages/Microsoft.Extensions.AI.Evaluation.Quality) – Contains evaluators that assess the quality of LLM responses in an app according to metrics such as relevance, fluency, coherence, and truthfulness.
- [📦 Microsoft.Extensions.AI.Evaluation.Reporting](https://www.nuget.org/packages/Microsoft.Extensions.AI.Evaluation.Reporting) – Contains support for caching LLM responses, storing the results of evaluations, and generating reports from that data.
- [📦 Microsoft.Extensions.AI.Evaluation.Reporting.Azure](https://www.nuget.org/packages/Microsoft.Extensions.AI.Evaluation.Reporting.Azure) - Supports the reporting library with an implementation for caching LLM responses and storing the evaluation results in an [Azure Storage](/azure/storage/common/storage-introduction) container.
- [📦 Microsoft.Extensions.AI.Evaluation.Console](https://www.nuget.org/packages/Microsoft.Extensions.AI.Evaluation.Console) – A command-line tool for generating reports and managing evaluation data.

## Test integration

The libraries are designed to integrate smoothly with existing .NET apps, allowing you to leverage existing testing infrastructures and familiar syntax to evaluate intelligent apps. You can use any test framework (for example, [MSTest](../../core/testing/index.md#mstest), [xUnit](../../core/testing/index.md#xunit), or [NUnit](../../core/testing/index.md#nunit)) and testing workflow (for example, [Test Explorer](/visualstudio/test/run-unit-tests-with-test-explorer), [dotnet test](../../core/tools/dotnet-test.md), or a CI/CD pipeline). The library also provides easy ways to do online evaluations of your application by publishing evaluation scores to telemetry and monitoring dashboards.

## Comprehensive evaluation metrics

The evaluation libraries were built in collaboration with data science researchers from Microsoft and GitHub, and were tested on popular Microsoft Copilot experiences. The following table shows the built-in evaluators.

| Metric | Description | Evaluator type |
|------------------------------------|----------------------------------------------|----------------|
| Relevance, truth, and completeness | How effectively a response addresses a query | <xref:Microsoft.Extensions.AI.Evaluation.Quality.RelevanceTruthAndCompletenessEvaluator> |
| Fluency | Grammatical accuracy, vocabulary range, sentence complexity, and overall readability| <xref:Microsoft.Extensions.AI.Evaluation.Quality.FluencyEvaluator> |
| Coherence | The logical and orderly presentation of ideas | <xref:Microsoft.Extensions.AI.Evaluation.Quality.CoherenceEvaluator> |
| Equivalence | The similarity between the generated text and its ground truth with respect to a query | <xref:Microsoft.Extensions.AI.Evaluation.Quality.EquivalenceEvaluator> |
| Groundedness | How well a generated response aligns with the given context | <xref:Microsoft.Extensions.AI.Evaluation.Quality.GroundednessEvaluator> |

You can also customize to add your own evaluations by implementing the <xref:Microsoft.Extensions.AI.Evaluation.IEvaluator> interface or extending the base classes such as <xref:Microsoft.Extensions.AI.Evaluation.Quality.ChatConversationEvaluator> and <xref:Microsoft.Extensions.AI.Evaluation.Quality.SingleNumericMetricEvaluator>.

## Cached responses

The library uses *response caching* functionality, which means responses from the AI model are persisted in a cache. In subsequent runs, if the request parameters (prompt and model) are unchanged, responses are then served from the cache to enable faster execution and lower cost.

## Reporting

The library contains support for storing evaluation results and generating reports. The following image shows an example report in an Azure DevOps pipeline:

:::image type="content" source="../media/ai-extensions/pipeline-report.jpg" lightbox="../media/ai-extensions/pipeline-report.jpg" alt-text="Screenshot of an AI evaluation report in an Azure DevOps pipeline.":::

The `dotnet aieval` tool, which ships as part of the `Microsoft.Extensions.AI.Evaluation.Console` package, also includes functionality for generating reports and managing the stored evaluation data and cached responses.

## Configuration

The libraries are designed to be flexible. You can pick the components that you need. For example, you can disable response caching or tailor reporting to work best in your environment. You can also customize and configure your evaluations, for example, by adding customized metrics and reporting options.

## Samples

For a more comprehensive tour of the functionality and APIs available in the Microsoft.Extensions.AI.Evaluation libraries, see the [API usage examples (dotnet/ai-samples repo)](https://github.com/dotnet/ai-samples/blob/main/src/microsoft-extensions-ai-evaluation/api/). These examples are structured as a collection of unit tests. Each unit test showcases a specific concept or API and builds on the concepts and APIs showcased in previous unit tests.

## See also

- [Evaluation of generative AI apps (Azure AI Foundry)](/azure/ai-studio/concepts/evaluation-approach-gen-ai)
Binary file added docs/ai/media/ai-extensions/pipeline-report.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
6 changes: 4 additions & 2 deletions docs/ai/toc.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ items:
href: index.yml
- name: Overview
href: get-started/dotnet-ai-overview.md
- name: Quickstart - Connect to and prompt an AI model
- name: "Quickstart: Connect to and prompt an AI model"
href: quickstarts/quickstart-openai-summarize-text.md
- name: AI frameworks and SDKs
items:
Expand Down Expand Up @@ -75,7 +75,9 @@ items:
href: /azure/ai-services/openai/how-to/risks-safety-monitor?toc=/dotnet/ai/toc.json&bc=/dotnet/ai/toc.json
- name: Evaluation
items:
- name: Evaluate LLM prompt completions
- name: The Microsoft.Extensions.AI.Evaluation libraries
href: conceptual/evaluation-libraries.md
- name: "Tutorial: Evaluate LLM prompt completions"
href: tutorials/llm-eval.md
- name: Resources
items:
Expand Down
2 changes: 1 addition & 1 deletion docs/azure/includes/dotnet-all.md
Original file line number Diff line number Diff line change
Expand Up @@ -462,7 +462,7 @@
| Speech Xamarin iOS | NuGet [1.25.0](https://www.nuget.org/packages/Microsoft.CognitiveServices.Speech.Xamarin.iOS/1.25.0) | | |
| Spell Check | NuGet [4.1.0-preview.1](https://www.nuget.org/packages/Microsoft.Azure.CognitiveServices.Language.SpellCheck/4.1.0-preview.1) | | GitHub [4.1.0-preview.1](https://github.com/Azure/azure-sdk-for-net/tree/Microsoft.Azure.CognitiveServices.Language.SpellCheck_4.1.0-preview.1/sdk/cognitiveservices/Language.SpellCheck) |
| Spring Cloud Client | NuGet [2.0.0-preview.3](https://www.nuget.org/packages/Microsoft.Azure.SpringCloud.Client/2.0.0-preview.3) | | |
| Storage - Files Data Lake | NuGet [2.0.1](https://www.nuget.org/packages/Microsoft.Azure.DataLake.Store/2.0.1) | [docs](https://learn.microsoft.com/dotnet/api/overview/azure/data-lake-store) | GitHub [2.0.1](https://github.com/Azure/azure-data-lake-store-net/tree/1.2.3-alpha) |
| Storage - Files Data Lake | NuGet [2.0.2](https://www.nuget.org/packages/Microsoft.Azure.DataLake.Store/2.0.2) | [docs](https://learn.microsoft.com/dotnet/api/overview/azure/data-lake-store) | GitHub [2.0.2](https://github.com/Azure/azure-data-lake-store-net/tree/1.2.3-alpha) |
| Synapse Analytics | NuGet [0.1.0-preview](https://www.nuget.org/packages/Microsoft.Azure.Synapse/0.1.0-preview) | | GitHub [0.1.0-preview](https://github.com/Azure/azure-sdk-for-net/tree/Microsoft.Azure.Synapse_0.1.0-preview/sdk/synapse/Microsoft.Azure.Synapse/) |
| Tables | NuGet [2.1.2](https://www.nuget.org/packages/Microsoft.Azure.CosmosDB.Table/2.1.2) | | |
| Video Search | NuGet [2.1.0-preview.1](https://www.nuget.org/packages/Microsoft.Azure.CognitiveServices.Search.BingVideoSearch/2.1.0-preview.1) | | GitHub [2.1.0-preview.1](https://github.com/Azure/azure-sdk-for-net/tree/Microsoft.Azure.CognitiveServices.Search.BingVideoSearch_2.1.0-preview.1/sdk/cognitiveservices/Search.BingVideoSearch) |
Expand Down
9 changes: 5 additions & 4 deletions docs/core/compatibility/9.0.md
Original file line number Diff line number Diff line change
Expand Up @@ -112,10 +112,11 @@ If you're migrating an app to .NET 9, the breaking changes listed here might aff

## Serialization

| Title | Type of change | Introduced version |
|-------------------------------------------------------------------------------|-------------------|--------------------|
| [BinaryFormatter always throws](serialization/9.0/binaryformatter-removal.md) | Behavioral change | Preview 6 |
| [Nullable JsonDocument properties deserialize to JsonValueKind.Null](serialization/9.0/jsondocument-props.md) | Behavioral change | Preview 1 |
| Title | Type of change | Introduced version |
|---------------------------------------------------------------------------------------------------------------------|-------------------|--------------------|
| [BinaryFormatter always throws](serialization/9.0/binaryformatter-removal.md) | Behavioral change | Preview 6 |
| [Nullable JsonDocument properties deserialize to JsonValueKind.Null](serialization/9.0/jsondocument-props.md) | Behavioral change | Preview 1 |
| [System.Text.Json metadata reader now unescapes metadata property names](serialization/9.0/json-metadata-reader.md) | Behavioral change | GA |

## Windows Forms

Expand Down
Loading
Loading