> For the complete documentation index, see [llms.txt](https://docs.raga.ai/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.raga.ai/ragaai-catalyst/ragaai-metric-library/guardrails/profanity-check.md).

# Profanity Check

Automatically detect and block profanity in LLM responses. Maintain safe and professional content.

**Objective**\
Identifies and filters out profane or offensive language, ensuring respectful interactions.

**Interpretation**\
A higher score indicates the presence of profanity. A lower (or zero) score indicates no profane language was detected.

**Code Execution**

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

**Example**

* **Prompt**: “Why is it important to stay calm during arguments?”
* **Context**: “Profanity is not permitted.”
* **Response**: “Because yelling or using f\*\*\* words doesn’t help!”
* **Metric Output**: `{"score": 1, "reason": "Profane or offensive language detected."}`
