IntentClassificationMetric
leverages the classifyIntent
function to perform this evaluation.
classifyIntent
Functioninput
: The text to be classified.expectedIntents
: A list of expected intents to evaluate against.IntentClassificationMetric
ClassIntentClassificationMetric
classifies and evaluates the intent behind text based on predefined expectations.
input
: The text to be classified.expectedIntents
: The expected intents against which the text will be evaluated.evaluateSteps
method invokes classifyIntent
and returns a detailed result, including a score and reasons. The score reflects how closely the detected intent matches the expected intents, with detailed reasons explaining the similarities and differences.