LabeledComparison - Tinker Documentation
tinker_cookbook.preference.LabeledComparison
class tinker_cookbook.preference.LabeledComparison()
A Comparison annotated with a human preference label (A, B, or Tie).
labeled = LabeledComparison(comparison=comparison, label="A")
Fields:
- comparison ( Comparison)
- label ( Literal['A', 'B', 'Tie'])
swap()
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 – A copy with completions and label swapped.