RelevanceTruthAndCompletenessEvaluator class
Evaluates an AI response on three dimensions — Relevance, Truth, and Completeness — in a single model call, returning one NumericMetric per dimension (each scored 1–5).
Requires a ChatConfiguration; unlike other quality evaluators this one asks the model to respond with a JSON object rather than XML score tags.
Constructors
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
modelResponseand 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
- completenessMetricName → const String
- The name of the Completeness NumericMetric returned by this evaluator.
- relevanceMetricName → const String
- The name of the Relevance NumericMetric returned by this evaluator.
- truthMetricName → const String
- The name of the Truth NumericMetric returned by this evaluator.