StringMetric(String, String, String) Constructor
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
An EvaluationMetric containing a String value.
public StringMetric(string name, string? value = default, string? reason = default);
new Microsoft.Extensions.AI.Evaluation.StringMetric : string * string * string -> Microsoft.Extensions.AI.Evaluation.StringMetric
Public Sub New (name As String, Optional value As String = Nothing, Optional reason As String = Nothing)
Parameters
- name
- String
The name of the StringMetric.
- value
- String
The value of the StringMetric.
- reason
- String
An optional string that can be used to provide some commentary around the result represented by this 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).