Definition
The exact match test assesses if two strings are identical in every aspect, including capitalization, punctuation, and spacing.Taxonomy
- Task types: LLM.
- Availability: and .
Why it matters
- Exact match provides the strictest measure of text generation accuracy, requiring perfect correspondence between generated and reference text.
- This metric is particularly useful for tasks where precision is critical, such as code generation, structured data extraction, or specific formatting requirements.
- It helps identify when your model produces outputs that are close but not exactly correct, which might be important for certain applications.
Required columns
To compute this metric, your dataset must contain the following columns:- Outputs: The generated text from your LLM
- Ground truths: The reference/expected text to compare against
Test configuration examples
If you are writing atests.json
, here are a few valid configurations for the exact match test:
Related
- Quasi-exact match test - Allow partial matches and variations.
- Edit distance test - Measure character-level similarity.
- BLEU score test - Measure n-gram based text similarity.
- Aggregate metrics - Overview of all available metrics.