You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: docs/ai/tutorials/evaluate-with-reporting.md
+22-22Lines changed: 22 additions & 22 deletions
Original file line number
Diff line number
Diff line change
@@ -1,14 +1,14 @@
1
1
---
2
2
title: Tutorial - Evaluate a model's response
3
3
description: Create an MSTest app and add a custom evaluator to evaluate the AI chat response of a language model, and learn how to use the caching and reporting features of Microsoft.Extensions.AI.Evaluation.
4
-
ms.date: 03/14/2025
4
+
ms.date: 05/09/2025
5
5
ms.topic: tutorial
6
6
ms.custom: devx-track-dotnet-ai
7
7
---
8
8
9
9
# Tutorial: Evaluate a model's response with response caching and reporting
10
10
11
-
In this tutorial, you create an MSTest app to evaluate the chat response of an OpenAI model. The test app uses the [Microsoft.Extensions.AI.Evaluation](https://www.nuget.org/packages/Microsoft.Extensions.AI.Evaluation) libraries to perform the evaluations, cache the model responses, and create reports. The tutorial uses both a [built-in evaluator](xref:Microsoft.Extensions.AI.Evaluation.Quality.RelevanceTruthAndCompletenessEvaluator)and a custom evaluator.
11
+
In this tutorial, you create an MSTest app to evaluate the chat response of an OpenAI model. The test app uses the [Microsoft.Extensions.AI.Evaluation](https://www.nuget.org/packages/Microsoft.Extensions.AI.Evaluation) libraries to perform the evaluations, cache the model responses, and create reports. The tutorial uses both built-in and custom evaluators.
12
12
13
13
## Prerequisites
14
14
@@ -25,32 +25,32 @@ Complete the following steps to create an MSTest project that connects to the `g
25
25
26
26
1. In a terminal window, navigate to the directory where you want to create your app, and create a new MSTest app with the `dotnet new` command:
27
27
28
-
```dotnetcli
29
-
dotnet new mstest -o TestAIWithReporting
30
-
```
28
+
```dotnetcli
29
+
dotnet new mstest -o TestAIWithReporting
30
+
```
31
31
32
32
1. Navigate to the `TestAIWithReporting` directory, and add the necessary packages to your app:
1. Run the following commands to add [app secrets](/aspnet/core/security/app-secrets) for your Azure OpenAI endpoint, model name, and tenant ID:
47
47
48
-
```bash
49
-
dotnet user-secrets init
50
-
dotnet user-secrets set AZURE_OPENAI_ENDPOINT <your-azure-openai-endpoint>
51
-
dotnet user-secrets set AZURE_OPENAI_GPT_NAME gpt-4o
52
-
dotnet user-secrets set AZURE_TENANT_ID <your-tenant-id>
53
-
```
48
+
```bash
49
+
dotnet user-secrets init
50
+
dotnet user-secrets set AZURE_OPENAI_ENDPOINT <your-azure-openai-endpoint>
51
+
dotnet user-secrets set AZURE_OPENAI_GPT_NAME gpt-4o
52
+
dotnet user-secrets set AZURE_TENANT_ID <your-tenant-id>
53
+
```
54
54
55
55
(Depending on your environment, the tenant ID might not be needed. In that case, remove it from the code that instantiates the <xref:Azure.Identity.DefaultAzureCredential>.)
0 commit comments