Skip to main content

agrag.eval.answer.faithfulness

faithfulness(judge:DeepEvalBaseLLM, *, threshold:float = 0.5) -> BaseMetric

Build the metric for claims that the evidence the agent saw does not contradict.

A claim that the evidence does not mention counts as faithful. Only a claim that the evidence contradicts lowers the score. CitationAccuracyMetric catches unsupported claims.

Parameters:

  • judge (DeepEvalBaseLLM) – The judge model.
  • threshold (float) – The minimum score that counts as success.

Returns:

  • BaseMetric – The faithfulness metric.