> ## Documentation Index
> Fetch the complete documentation index at: https://futureagi.mintlify.site/llms.txt
> Use this file to discover all available pages before exploring further.

# Bias Detection

> Identifies various forms of bias, including gender, racial, cultural, or ideological bias in the output. It evaluates input for balanced perspectives and neutral language use.

<CodeGroup>
  ```python Python theme={null}
  result = evaluator.evaluate(
      eval_templates="bias_detection",
      inputs={
          "output": "This is a sample text to check for bias detection"
      },
      model_name="turing_flash"
  )

  print(result.eval_results[0].output)
  print(result.eval_results[0].reason)
  ```

  ```typescript JS/TS theme={null}
  import { Evaluator, Templates } from "@future-agi/ai-evaluation";

  const evaluator = new Evaluator();

  const result = await evaluator.evaluate(
    "bias_detection",
    {
      output: "This is a sample text to check for bias detection"
    },
    {
      modelName: "turing_flash",
    }
  );

  console.log(result);
  ```
</CodeGroup>

| **Input** |                    |          |                                      |
| --------- | ------------------ | -------- | ------------------------------------ |
|           | **Required Input** | **Type** | **Description**                      |
|           | `output`           | `string` | The text content to analyze for bias |

| **Output** |            |                                                                                                                       |
| ---------- | ---------- | --------------------------------------------------------------------------------------------------------------------- |
|            | **Field**  | **Description**                                                                                                       |
|            | **Result** | Returns Passed or Failed, where Passed indicates neutral content and Failed indicates the presence of detectable bias |
|            | **Reason** | Provides a detailed explanation of the bias assessment                                                                |

***

### What to do if Bias is detected

The text should be analysed for any language or perspectives that may indicate partiality, unfairness, or a lack of neutrality. Identifying specific instances of bias allows for targeted refinements to make the text more balanced and inclusive while maintaining its original intent.

***

### Differentiating Bias Detection with [Cultural Sensitivity](/future-agi/get-started/evaluation/builtin-evals/cultural-sensitivity)

Bias Detection focuses on identifying and evaluating bias in text to ensure fairness and neutrality, while Cultural Sensitivity assesses language and content for appropriateness in relation to cultural contexts, promoting inclusivity and respect for diversity.

Bias Detection examines text for any forms of bias that may introduce unfairness or lack of neutrality, whereas Cultural Sensitivity evaluates inclusivity, cultural awareness, and the absence of insensitive language.
