ToolCallAccuracyEvaluator class
Evaluates how accurately an AI system used the tools available to it, examining relevance, parameter correctness, and value extraction accuracy.
Returns a NumericMetric named "ToolCallAccuracy" scored 1–5 (fail
below 3). Requires a ToolCallAccuracyEvaluatorContext and a
ChatConfiguration.
- Inheritance
-
- Object
- QualityEvaluatorBase
- ToolCallAccuracyEvaluator
- Annotations
-
- @Source(name: 'ToolCallAccuracyEvaluator.cs', namespace: 'Microsoft.Extensions.AI.Evaluation.Quality', repository: 'dotnet/extensions', path: 'src/Libraries/Microsoft.Extensions.AI.Evaluation.Quality/')
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
-
buildEvaluationInstructions(
List< ChatMessage> messages, ChatResponse modelResponse, List<EvaluationContext> additionalContext) → List<ChatMessage> ? -
Builds the evaluation instructions (system + user messages).
override
-
evaluate(
Iterable< ChatMessage> messages, ChatResponse modelResponse, {ChatConfiguration? chatConfiguration, Iterable<EvaluationContext> ? additionalContext, CancellationToken? cancellationToken}) → Future<EvaluationResult> -
Evaluates
modelResponseand returns an EvaluationResult.inherited -
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
- toolCallAccuracyMetricName → const String
- The name of the NumericMetric returned by this evaluator.