EquivalenceEvaluator Class
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 IEvaluator that evaluates the 'Equivalence' of a response produced by an AI model.
public ref class EquivalenceEvaluator sealed : Microsoft::Extensions::AI::Evaluation::Quality::SingleNumericMetricEvaluator
public sealed class EquivalenceEvaluator : Microsoft.Extensions.AI.Evaluation.Quality.SingleNumericMetricEvaluator
type EquivalenceEvaluator = class
inherit SingleNumericMetricEvaluator
Public NotInheritable Class EquivalenceEvaluator
Inherits SingleNumericMetricEvaluator
- Inheritance
Remarks
The EquivalenceEvaluator measures the degree to which the response being evaluated is similar to the response supplied via GroundTruth. It returns a NumericMetric that contains a score for the 'Equivalence'. The score is a number between 1 and 5, with 1 indicating a poor score, and 5 indicating an excellent score.
Constructors
EquivalenceEvaluator() |
Properties
EquivalenceMetricName |
Gets the Name of the NumericMetric returned by EquivalenceEvaluator. |
EvaluationMetricNames |
Gets the Names of the EvaluationMetrics produced by this IEvaluator. (Inherited from SingleNumericMetricEvaluator) |
IgnoresHistory |
Gets a value indicating whether this IEvaluator considers the entire conversation history (in addition to the request and response being evaluated) as part of the evaluation it performs. (Inherited from ChatConversationEvaluator) |
MetricName |
Gets the Name of the NumericMetric produced by this IEvaluator. (Inherited from SingleNumericMetricEvaluator) |
SystemPrompt |
Gets the system prompt that this IEvaluator uses when performing evaluations. (Inherited from SingleNumericMetricEvaluator) |
Methods
CanRenderAsync(ChatMessage, Int32, ChatConfiguration, CancellationToken) |
Determines if there is sufficient |
EvaluateAsync(IEnumerable<ChatMessage>, ChatResponse, ChatConfiguration, IEnumerable<EvaluationContext>, CancellationToken) |
Evaluates the supplied |
InitializeResult() |
Returns an EvaluationResult that includes default values for all the EvaluationMetrics supported by this IEvaluator. (Inherited from SingleNumericMetricEvaluator) |
PerformEvaluationAsync(ChatConfiguration, IList<ChatMessage>, EvaluationResult, CancellationToken) |
Invokes the supplied ChatClient with the supplied
|
RenderAsync(ChatMessage, CancellationToken) |
Renders the supplied |
RenderAsync(ChatResponse, CancellationToken) |
Renders the supplied |
RenderEvaluationPromptAsync(ChatMessage, ChatResponse, IEnumerable<ChatMessage>, IEnumerable<EvaluationContext>, CancellationToken) |
Renders the information present in the supplied parameters into a prompt that this IEvaluator uses to perform the evaluation. (Inherited from ChatConversationEvaluator) |