Dela via


ReportingConfiguration Constructor

Definition

Initializes a new instance of the ReportingConfiguration class.

public ReportingConfiguration(System.Collections.Generic.IEnumerable<Microsoft.Extensions.AI.Evaluation.IEvaluator> evaluators, Microsoft.Extensions.AI.Evaluation.Reporting.IResultStore resultStore, Microsoft.Extensions.AI.Evaluation.ChatConfiguration? chatConfiguration = default, Microsoft.Extensions.AI.Evaluation.Reporting.IResponseCacheProvider? responseCacheProvider = default, System.Collections.Generic.IEnumerable<string>? cachingKeys = default, string executionName = "Default", Func<Microsoft.Extensions.AI.Evaluation.EvaluationMetric,Microsoft.Extensions.AI.Evaluation.EvaluationMetricInterpretation?>? evaluationMetricInterpreter = default);
new Microsoft.Extensions.AI.Evaluation.Reporting.ReportingConfiguration : seq<Microsoft.Extensions.AI.Evaluation.IEvaluator> * Microsoft.Extensions.AI.Evaluation.Reporting.IResultStore * Microsoft.Extensions.AI.Evaluation.ChatConfiguration * Microsoft.Extensions.AI.Evaluation.Reporting.IResponseCacheProvider * seq<string> * string * Func<Microsoft.Extensions.AI.Evaluation.EvaluationMetric, Microsoft.Extensions.AI.Evaluation.EvaluationMetricInterpretation> -> Microsoft.Extensions.AI.Evaluation.Reporting.ReportingConfiguration
Public Sub New (evaluators As IEnumerable(Of IEvaluator), resultStore As IResultStore, Optional chatConfiguration As ChatConfiguration = Nothing, Optional responseCacheProvider As IResponseCacheProvider = Nothing, Optional cachingKeys As IEnumerable(Of String) = Nothing, Optional executionName As String = "Default", Optional evaluationMetricInterpreter As Func(Of EvaluationMetric, EvaluationMetricInterpretation) = Nothing)

Parameters

evaluators
IEnumerable<IEvaluator>

The set of IEvaluators that should be invoked to evaluate AI responses.

resultStore
IResultStore

The IResultStore that should be used to persist the ScenarioRunResults.

chatConfiguration
ChatConfiguration

A ChatConfiguration that specifies the IChatClient and the IEvaluationTokenCounter that are used by AI-based evaluators included in this ReportingConfiguration. Can be omitted if none of the included evaluators are AI-based.

responseCacheProvider
IResponseCacheProvider

The IResponseCacheProvider that should be used to cache AI responses. If omitted, AI responses will not be cached.

cachingKeys
IEnumerable<String>

An optional collection of unique strings that should be hashed when generating the cache keys for cached AI responses. See CachingKeys for more information about this concept.

executionName
String

The name of the current execution. See ExecutionName for more information about this concept. Uses a fixed default value "Default" if omitted.

evaluationMetricInterpreter
Func<EvaluationMetric,EvaluationMetricInterpretation>

An optional function that can be used to override EvaluationMetricInterpretations for EvaluationMetrics returned from evaluations that use this ReportingConfiguration. The supplied function can either return a new EvaluationMetricInterpretation for any EvaluationMetric that is supplied to it, or return null if the Interpretation should be left unchanged.

Applies to