Contains any evaluation metric

Last updated: Feb 07, 2025
Contains any evaluation metric

The contains any metric measures whether the rows in the prediction contain any of the specified keywords.

Metric details

Contains any is a content validation metric that uses string-based functions to analyze and validate generated LLM output text. The metric is available only when you use the Python SDK to calculate evaluation metrics.

Scope

The contains any metric evaluates generative AI assets only.

  • Types of AI assets: Prompt templates
  • Generative AI tasks:
    • Text summarization
    • Content generation
    • Question answering
    • Entity extraction
    • Retrieval augmented generation (RAG)
  • Supported languages: English

Scores and values

The contains any metric score indicates whether any of the specified keywords are found in the prediction rows.

  • Range of values: 0.0-1.0
  • Ratios:
    • At 0: The prediction does not contain any of the specified keywords.
    • At 1: The prediction contains specified keywords.

Settings

  • Thresholds:
    • Lower limit: 0
    • Upper limit: 1

Parent topic: Evaluation metrics