langcheck.metrics.reference_based_text_quality#

langcheck.metrics.reference_based_text_quality.exact_match(generated_outputs: List[str] | str, reference_outputs: List[str] | str, prompts: List[str] | str | None = None) MetricValue[int][source]#

Checks if the generated outputs exact matches with the reference outputs. This metric takes on binary 0 or 1 values.

Parameters:
  • generated_outputs – The model generated output(s) to evaluate

  • reference_outputs – The reference output(s)

  • prompts – The prompts used to generate the output(s). Prompts are optional metadata and not used to calculate the metric.

Returns:

An MetricValue object