import { evaluate, IntentClassificationMetric } from '@evalkit/core';
evaluate({
// The text input for intent classification
input: "Can you help me find a nearby pharmacy?",
// The expected intent(s) for the classification
expectedIntents: ["LocateService", "HealthInquiry"],
}, [IntentClassificationMetric])
// outputs
{
passed: true,
// The coherence score is 0.9, which is calculated based on the percentage of coherent statements from all statements in the text.
score: 0.5,
Reasons: [
'Detected intents: LocateService, HealthInquiry',
'Matching intents: 1 out of 2'
]
}