πŸ“„ String Containment RatioΒΆ

metrics.string_containment_ratio

StringContainmentRatio(
    field="entities",
)
[source]

Explanation about StringContainmentRatioΒΆ

Metric that returns the ratio of values from a specific field contained in the prediction.

Attributes:

field: The field from the task_data that contains the values to be checked for containment.

Example task that contains this metric:

Task(
    input_fields={"question": str},
    reference_fields={"entities": str},
    prediction_type=str,
    metrics=["string_containment_ratio[field=entities]"],
)

Read more about catalog usage here.