EvaluationResult Class

Definition

A collection of one or more EvaluationMetrics that represent the result of an evaluation.

public ref class EvaluationResult sealed
public sealed class EvaluationResult
type EvaluationResult = class
Public NotInheritable Class EvaluationResult
Inheritance
EvaluationResult

Constructors

EvaluationResult(EvaluationMetric[])

Initializes a new instance of the EvaluationResult class.

EvaluationResult(IDictionary<String,EvaluationMetric>)

Initializes a new instance of the EvaluationResult class.

EvaluationResult(IEnumerable<EvaluationMetric>)

Initializes a new instance of the EvaluationResult class.

Properties

Metrics

Gets or sets a collection of one or more EvaluationMetrics that represent the result of an evaluation.

Methods

Get<T>(String)

Returns an EvaluationMetric with type T and with the Name specified via metricName if it exists in Metrics.

TryGet<T>(String, T)

Returns an EvaluationMetric with type T and with the Name specified via metricName if it exists in Metrics.

Extension Methods

AddDiagnosticsToAllMetrics(EvaluationResult, EvaluationDiagnostic[])

Adds the supplied diagnostics to all EvaluationMetrics contained in the supplied result.

AddDiagnosticsToAllMetrics(EvaluationResult, IEnumerable<EvaluationDiagnostic>)

Adds the supplied diagnostics to all EvaluationMetrics contained in the supplied result.

AddOrUpdateChatMetadataInAllMetrics(EvaluationResult, ChatResponse, Nullable<TimeSpan>)

Adds or updates metadata available as part of the evaluation response produced by an AI model, in all EvaluationMetrics contained in the supplied result.

AddOrUpdateContextInAllMetrics(EvaluationResult, EvaluationContext[])

Adds or updates the supplied context objects in all EvaluationMetrics contained in the supplied result.

AddOrUpdateContextInAllMetrics(EvaluationResult, IEnumerable<EvaluationContext>)

Adds or updates the supplied context objects in all EvaluationMetrics contained in the supplied result.

AddOrUpdateMetadataInAllMetrics(EvaluationResult, IDictionary<String,String>)

Adds or updates the supplied metadata in all EvaluationMetrics contained in the supplied result.

AddOrUpdateMetadataInAllMetrics(EvaluationResult, String, String)

Adds or updates metadata with the specified name and value in all EvaluationMetrics contained in the supplied result.

ContainsDiagnostics(EvaluationResult, Func<EvaluationDiagnostic,Boolean>)

Returns true if any EvaluationMetric contained in the supplied result contains an EvaluationDiagnostic matching the supplied predicate; false otherwise.

Interpret(EvaluationResult, Func<EvaluationMetric,EvaluationMetricInterpretation>)

Applies EvaluationMetricInterpretations to one or more EvaluationMetrics contained in the supplied result.

Applies to

See also