eval_hallucination
Evaluate whether an LLM output contains fabricated content by comparing against a ground-truth context. Provides a score and pass/fail result.
Instructions
Detect fabricated information not present in the context.
Score 1.0 = no hallucination. Score 0.0 = significant hallucination.
Args: output: The LLM output to check. context: The ground-truth context the output should be grounded in. judge_model: Provider:model for the QAG judge.
Returns:
{"score": 0.0-1.0, "passed": bool, "reason": str, "threshold": float}.
Tool call template
Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {
"output": "<output>",
"context": "<context>"
},
"name": "eval_hallucination"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| output | Yes | ||
| context | Yes | ||
| judge_model | No | anthropic:claude-haiku-4-5 |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
No arguments | |||