# Toxicity

The **Toxicity metric** is a **span-level metric** used to measure the degree of offensive, harmful, or inappropriate content in the **response** generated by the Agentic application. This metric is essential for ensuring that the model's outputs align with ethical and inclusive communication standards.

***

#### **How to Run the Metric**

1. **Access the Dataset**
   * Navigate to the dataset where you wish to evaluate toxicity.
   * Click on the **Evaluate** button.
2. **Select the Metric**
   * Choose **Toxicity-Alteryx** from the list of metrics.
   * Optionally, rename the metric for easier identification.
3. **Choose the Evaluation Type**
   * Select the evaluation type based on the component to evaluate:
     * **LLM**: For spans related to language model outputs.
     * **Agent**: For agent-level responses.
     * **Tool**: For outputs generated by specific tools.
4. **Define the Schema**
   * Specify the **span name** to evaluate.
   * Choose the parameter to analyse, such as:
     * `input`
     * `output`
     * `ground truth`
5. **Configure the Model**
   * Select the **model configuration** for the evaluation.
6. **Set Passing Criteria**
   * Define the **pass/fail threshold** to establish acceptable toxicity levels.
7. **Run the Metric**
   * Click on **Run** to initiate the evaluation process.

***


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.raga.ai/ragaai-catalyst/agentic-testing/metrics/toxicity.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
