Answer similarity
Answer similarity rates the semantic similarity between an output and a reference on a 0–3 scale, ignoring wording. It mirrors RAGAS answer_similarity and autoevals AnswerSimilarity without needing an embedding model.
What the evaluator does
A Jev Score question from “mean different things” to “semantically equivalent”. Because it is a judgment rather than a cosine distance, paraphrases with opposite meaning score low.
Rate the semantic similarity between `output` and `expected`, ignoring wording differences.
The question, verbatim
This is the question the API sends for the example below, generated from the same code path the playground and API use. Jev sees the request fields as state and returns a probability for each outcome. Nothing is generated, so there is nothing to parse.
Rate the semantic similarity between `output` and `expected`, ignoring wording differences.
- 0The output and expected answer mean different things
- 1They overlap in topic but differ in key meaning
- 2They mean largely the same thing with different emphasis or detail
- 3They are semantically equivalent
Reach for it when
- Paraphrase detection and near-duplicate checks.
- As a lenient companion to answer_correctness when style varies a lot.
Not the right tool when
- Facts must be right, not just similar (use answer_correctness).
- You already have embeddings and want a pure geometric similarity.
Watch out for
- Similar topic, different claim: the rubric's level 1 exists for exactly this, but do not use similarity as a correctness proxy.
What to send
score 0–1 (expected level ÷ top level), label “x.x / n”, confidence, a probability per level, passed at 75% of the scale.
{
"evaluators": [
"answer_similarity"
],
"output": "The model returns calibrated probabilities, not text.",
"expected": "The model returns calibrated probabilities rather than text."
}Level 3: semantically equivalent.
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.
- Is this the same as embedding cosine similarity?
- No. It is a semantic judgment: two sentences about the same topic with opposite claims score low here and could score high on cosine similarity.