StringMetric(String, String) Constructor

Definition

An EvaluationMetric containing a String value.

public StringMetric(string name, string? value = default);
new Microsoft.Extensions.AI.Evaluation.StringMetric : string * string -> Microsoft.Extensions.AI.Evaluation.StringMetric
Public Sub New (name As String, Optional value As String = Nothing)

Parameters

name
String

The name of the StringMetric.

value
String

The value of the StringMetric.

Remarks

A common use case for StringMetric is to represent a single value in an enumeration (or to represent one value out of a set of possible values).

Applies to