Meaning Match
Meaning Match
The Meaning Match metric evaluates whether an LLM’s output semantically matches a ground truth answer, regardless of phrasing or formatting. This metric is particularly useful for evaluating question-answering systems where the same answer can be expressed in different ways.
How to use the Meaning Match metric
You can run Meaning Match as an LLM-as-a-Judge online evaluation rule to score the traces in your project.
Creating a rule with Meaning Match
- Open your project and select Online evaluation in the sidebar
- Click Evaluator > LLM-as-a-Judge
- Name the evaluator Meaning Match. The name is also the score name.
- Paste the Meaning Match prompt into the prompt editor
- Point
{{input}},{{ground_truth}}and{{output}}at the trace fields that hold them. Type{{to pick a field, for example{{metadata.ground_truth}}. Paths must start withinput,outputormetadata. - Keep the main score type as Boolean
- Select your judge model, and set filters and the sampling rate as needed
- Click Create evaluator
Understanding the scores
The Meaning Match metric returns a boolean score:
- true (1.0): The output conveys the same essential answer as the ground truth, even if worded differently
- false (0.0): The output contradicts, differs from, or fails to include the core answer in the ground truth
Each score includes a detailed reason explaining the judgment.
Evaluation Guidelines
The Meaning Match metric follows these rules when evaluating responses:
- Focus on factual equivalence - Ignores style, grammar, or verbosity
- Accept aliases and synonyms - “NYC” ≈ “New York City”; “Da Vinci” ≈ “Leonardo da Vinci”
- Ignore formatting - Case, punctuation, and whitespace differences are acceptable
- Allow extra context - Additional details are okay if they don’t contradict the main answer
- Reject hedging - Uncertain or incomplete answers score as false
- Treat numeric equivalents - “100” = “one hundred”
- Reject multiple alternatives - If the output includes the correct answer with incorrect alternatives, it scores as false
Example evaluations
Meaning Match Prompt
Use the prompt below in your rule. The judge runs on the model you select in the rule.
Use cases
The Meaning Match metric is ideal for:
- Question-answering systems - Evaluate if answers are semantically correct
- Information extraction - Verify extracted entities match expected values
- Knowledge base validation - Check if responses align with ground truth knowledge
- RAG systems - Assess if retrieved information correctly answers questions
- Multi-language systems - Compare answers across translations (when ground truth is translated)
Best practices
- Provide clear ground truth - The more specific the ground truth, the more accurate the evaluation
- Use with other metrics - Combine with other metrics like hallucination or answer relevance for comprehensive evaluation
- Monitor false positives/negatives - Review evaluation results periodically to ensure the metric works well for your use case
- Test with edge cases - Try the metric with ambiguous or borderline cases to understand its behavior