evaluate_llm_output
When: you hold outputs a model already produced and want them judged without calling the model again. Each check runs when its input is given: source → grounding: is the model making things up, claims, numbers or negations its source does not support; reference → similarity to an expected answer (cosine + ROUGE-L); rules → guardrails on what the assistant may or may not say (must include, must not include, length, format, regex, no PII); schema → JSON Schema; outputs (the same question asked several times) → consistency; variants ({variantId, answer}, e.g. answers for men and for women) → bias; base + transformed (answers to the question rephrased, retyped, reordered) → metamorphic stability. Gives: one gate per check, the worst on top. Deterministic, no model call, no key. Does not prove: that a well-grounded answer is right when its source is wrong, nor tone or helpfulness, which need a calibrated judge.
Example tool call
This call uses example arguments supplied in the tool’s input schema.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {
"output": "Refunds are accepted within 60 days.",
"source": "Refunds are accepted within 30 days of delivery."
},
"name": "evaluate_llm_output"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| base | No | Metamorphic: {question?, output} of the original question. | |
| rules | No | [{type, value}]: must_include, must_not_include, max_length, min_length, word_count_max, word_count_min, starts_with, ends_with, format (json, markdown, bullet_list), regex_match, regex_not_match; or "no_pii". | |
| checks | No | Default: every check whose input is given. | |
| output | No | The model output to judge. | |
| schema | No | JSON Schema the output (as JSON) must satisfy. | |
| source | No | Text the output must be grounded in. | |
| outputs | No | Several outputs of the same prompt. | |
| variants | No | [{variantId, answer}], one per variant of the prompt. | |
| reference | No | Expected answer. | |
| thresholds | No | For similarity: {cosine, rouge_l} (defaults 0.75, 0.5). | |
| transformed | No | Metamorphic: [{relation: case|typo|paraphrase|reorder|translation|specialization, output}], answers to transformed questions. | |
| metamorphic_thresholds | No | Per-relation overrides, 0-1. |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| gate | No | ||
| checks | No | ||
| verdict | No | ||
| next_steps | No |