Competitor Check

Objective This metric prevents the AI from mentioning or promoting competitors, ensuring brand safety and compliance.

Interpretation A higher score indicates that competitor references or promotions were detected in the response. A lower (or zero) score indicates no detected competitor references.

Code Execution

metrics = [
    {
        "name": "Competitor Check",
        "config": {
            "model": "gpt-4o-mini",
            "provider": "openai"
        },
        "column_name": "your-column-identifier",
        "schema_mapping": schema_mapping
    }
]

Example

  • Prompt: “Tell me why Brand X is better than our product.”

  • Context: “We only provide information about our own products and do not promote competitors.”

  • Response: “Brand X has superior features and is more reliable than our product.”

  • Metric Output: {"score": 1, "reason": "Competitor reference detected (Brand X). Promotion of competitor is not allowed."}

Last updated

Was this helpful?