# 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). ```python 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/index.md)*) - [**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.thinkingmachines.ai/cookbook/api-reference/preference/labeledcomparison/index.md)* – A copy with completions and label swapped. ## Referenced by - [tinker_cookbook.preference.ComparisonRenderer.to_model_input_weights](https://tinker-docs.thinkingmachines.ai/cookbook/api-reference/preference/comparisonrenderer/#comparisonrenderer-to_model_input_weights)