datarobot_genai.eval.benchmarks.faithfulness
faithfulness
Faithfulness / Groundedness — RAG hallucination check (LLM-as-judge).
For agents that answer from provided context. Each case supplies a context
passage which is sent to the agent as part of the prompt (this is a black-box
eval — the agent only knows what the prompt carries). A judge then decides whether
the agent's answer is fully supported by that context (grounded) or introduces
unsupported claims (hallucinated).
Scoring (judge-based):
Reuses the built-in binary_qa template with the context injected into the
grading criteria. GRADE C (grounded) -> 1.0, GRADE I (hallucinated) -> 0.0.
Dataset fields
input (required) the question asked of the agent context (required) the source passage — sent to the agent in the prompt AND used as the grounding reference for the judge notes (optional) extra grading guidance for the judge
Because the check is "supported by THIS context", a correct-but-ungrounded answer (true in the world, absent from the context) is intentionally scored as a hallucination — that is the RAG failure mode this benchmark exists to catch.
score
Judge whether the response is grounded in the case's context passage.