GLEUEvaluator class

Evaluates response quality using Google-BLEU (GLEU) n-gram overlap.

Returns a NumericMetric named "GLEU" with a score between 0.0 and 1.0. The default pass/fail threshold is 0.5.

Requires a GLEUEvaluatorContext in additionalContext.

Implemented types
Annotations
  • @Source(name: 'GLEUEvaluator.cs', namespace: 'Microsoft.Extensions.AI.Evaluation.NLP', repository: 'dotnet/extensions', path: 'src/Libraries/Microsoft.Extensions.AI.Evaluation.NLP/')

Constructors

GLEUEvaluator()

Properties

evaluationMetricNames List<String>
The names of the EvaluationMetrics produced by this evaluator.
no setteroverride
hashCode int
The hash code for this object.
no setterinherited
runtimeType Type
A representation of the runtime type of the object.
no setterinherited

Methods

evaluate(Iterable<ChatMessage> messages, ChatResponse modelResponse, {ChatConfiguration? chatConfiguration, Iterable<EvaluationContext>? additionalContext, CancellationToken? cancellationToken}) Future<EvaluationResult>
Evaluates modelResponse and returns an EvaluationResult.
override
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toString() String
A string representation of this object.
inherited

Operators

operator ==(Object other) bool
The equality operator.
inherited

Constants

gleuMetricName → const String
The name of the NumericMetric returned by this evaluator.