# tinker_cookbook.preference.LabeledComparison

## _class_ [**tinker_cookbook.preference.LabeledComparison**](https://github.com/thinking-machines-lab/tinker-cookbook/blob/main/tinker_cookbook/preference/types.py#L64)()

A Comparison annotated with a human preference label (A, B, or Tie).

```
labeled = LabeledComparison(comparison=comparison, label="A")
```

**Fields:**

- [**comparison**](https://github.com/thinking-machines-lab/tinker-cookbook/blob/main/tinker_cookbook/preference/types.py#L77) ( _[Comparison](https://tinker-docs.thinkingmachines.ai/cookbook/api-reference/preference/comparison/)_)
- [**label**](https://github.com/thinking-machines-lab/tinker-cookbook/blob/main/tinker_cookbook/preference/types.py#L78) ( _Literal['A', 'B', 'Tie']_)

### [**swap**](https://github.com/thinking-machines-lab/tinker-cookbook/blob/main/tinker_cookbook/preference/types.py#L80)()

Return a new LabeledComparison with A/B swapped and label inverted.

The label is flipped (A becomes B and vice versa; Tie stays Tie) so
the semantics remain consistent after the swap.

**Returns:** _[LabeledComparison](https://tinker-docs.thinking-machines.ai/cookbook/api-reference/preference/labeledcomparison/)_ – A copy with completions and label swapped.
