Conversation relevance
Conversation relevance judges whether the latest reply stays relevant to the most recent user turn and consistent with the whole conversation. It mirrors promptfoo's `conversation-relevance` as a 0–3 Jev level over the prior turns in `conversation` and the reply in `output`.
What the evaluator does
The prior turns are the state; one Score question rates the reply from ignoring the conversation to fully relevant and consistent. Pass at 0.67 of the scale.
Rate how relevant `output` is to the latest user turn and how consistent it is with the whole conversation.
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.
`conversation` is the prior dialogue, oldest first; `output` is the assistant's latest reply. Rate how relevant `output` is to the most recent user turn and how consistent it is with everything said before.
- 0The reply ignores the conversation or answers a different question
- 1The reply is loosely related but drops context from earlier turns
- 2The reply is relevant to the latest turn and mostly consistent with earlier turns
- 3The reply is relevant to the latest turn and fully consistent with the whole conversation
Reach for it when
- Multi-turn assistants where context loss shows up several turns in.
- Regression tests on transcripts, judging one reply at a time.
Not the right tool when
- Single-turn QA (use answer_relevancy).
- Correctness of the reply (use factuality or faithfulness).
Watch out for
- Pass turns oldest first and prefix speakers (user:, assistant:) so the roles are unambiguous.
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": [
"conversation_relevance"
],
"conversation": [
"user: How long do refunds take?",
"assistant: Refunds are issued within 5–7 business days after we receive the returned item.",
"user: Can you put that in JSON with a single `summary` field?"
],
"output": "{\"summary\": \"Refunds are issued within 5-7 business days after we receive the returned item.\"}"
}Level 3: answers the latest turn and keeps the earlier facts.
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.
- How should I format the conversation?
- A string array, oldest turn first, each prefixed with the speaker: "user: …", "assistant: …". The reply under test goes in output, not in the array.