The Exact Match metric.

The Exact Match metric is a simple metric that calculates whether the target text exactly matches any of the references.

Configuration

Configuration for the parameters of the Exact Match metric:

title: "ExactMatchConfig"
type: "object"

Data

Accepted data format of the Exact Match metric:

title: "ExactMatchData"
type: "object"
properties:
  target:
    type: "string"
    description: "Input text to evaluate."
  references:
    type: "array"
    description: "The references to evaluate the target against."
    items:
      type: "string"
required:
  - "target"
  - "references"

Results

Format of the results of the Exact Match metric:

title: "ExactMatchResult"
type: "object"
$defs:
  ExactMatchStats:
    type: "object"
    properties:
      value:
        type: "number"
        description: "The ratio of exact match results."
    required:
      - "value"
properties:
  overall:
    $ref: "#/$defs/ExactMatchStats"
  examples:
    type: "array"
    items:
      $ref: "#/$defs/ExactMatchStats"
required:
  - "overall"
  - "examples"