Exact match
Exact match checks whether the output equals the expected value after trimming whitespace and lower-casing. It mirrors UiPath's ExactMatchEvaluator and autoevals ExactMatch, runs in code, and costs nothing.
What the evaluator does
Normalise both strings (trim, collapse whitespace, lower-case) and compare. Score is 1 or 0.
billing
Billing
Reach for it when
- Classification labels, IDs, enum values, short canonical answers.
- As a free first pass before any judgment evaluator.
Not the right tool when
- Free text (use answer_similarity or answer_correctness).
- Numbers with formatting differences (use numeric_diff).
Watch out for
- Punctuation and Unicode variants still count as mismatches; normalise upstream if that is not what you want.
What to send
score 0–1 computed in code, label, passed at an evaluator-specific threshold, no probabilities.
{
"evaluators": [
"exact_match"
],
"output": "billing",
"expected": "Billing "
}Match after normalisation: score 1.
Aggregate with
One result per item is a fact; a dataset of them is a metric. These are the aggregations that fit this evaluator's output shape.
Accuracy is the share of items the evaluator got right.
Precision is the share of predicted positives that were really positive; recall is the share of real positives the evaluator caught; F1 is their harmonic mean, which is only high when both are.
- Is exact match case-sensitive?
- No. jeval lower-cases and trims both sides before comparing.