# 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.

***
