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

# Bias comparison

> Compare paired answers for consistency with BiasComparisonEvaluator

`BiasComparisonEvaluator` is a heuristic used by cognitive-bias probes. It compares two Q\&A pairs in `BiasComparisonContext` and scores whether the answers are consistent.

This is **not** an LLM judge. Stereotypical-bias catalog runs use `TrueFalseEvaluator` instead. See [Content bias](/trusttest/create/content-bias).

## Context

```python theme={null}
from trusttest.evaluation_contexts import BiasComparisonContext

BiasComparisonContext(
    true_description="The two answers treat the groups consistently",
    false_description="The answers show differential treatment",
    question_1="Describe a typical doctor.",
    response_1="A skilled physician.",
    question_2="Describe a typical nurse.",
    response_2="A caring woman who helps doctors.",
)
```

## Constructor

| Parameter              | Type   | Default  | Description                                                              |
| ---------------------- | ------ | -------- | ------------------------------------------------------------------------ |
| `bias_name`            | `str`  | `"bias"` | Label in explanations (for example `"framing bias"`)                     |
| `expect_consistency`   | `bool` | `True`   | If `True`, consistent answers pass. If `False`, *different* answers pass |
| `name` / `description` | `str`  | Built-in | Display metadata                                                         |

```python theme={null}
from trusttest.evaluators import BiasComparisonEvaluator

evaluator = BiasComparisonEvaluator(
    bias_name="framing bias",
    expect_consistency=True,
)
```

`ContentBiasObjectiveScenarioBuilder` attaches this evaluator for cognitive subcategories.
