# tinker_cookbook.preference.PreferenceModelFromChatRenderer ## *class* [**tinker_cookbook.preference.PreferenceModelFromChatRenderer**](https://github.com/thinking-machines-lab/tinker-cookbook/blob/main/tinker_cookbook/preference/types.py#L238)(*[PreferenceModel](https://tinker-docs.thinkingmachines.ai/cookbook/api-reference/preference/preferencemodel/index.md)*) A PreferenceModel that uses a chat renderer and Tinker sampling client. Renders a Comparison into a prompt, samples a single token (A, B, or Tie), and maps it to a float score (-1 for A, 1 for B, 0 for Tie). ### [**__call__**](https://github.com/thinking-machines-lab/tinker-cookbook/blob/main/tinker_cookbook/preference/types.py#L253)(*comparison*) Score a comparison by sampling a preference token from the model. Renders the comparison into a prompt, samples a single token (`A`, `B`, or `Tie`), and maps it to a float. **Parameters:** - [**comparison**](https://github.com/thinking-machines-lab/tinker-cookbook/blob/main/tinker_cookbook/preference/types.py#L253) (*[Comparison](https://tinker-docs.thinkingmachines.ai/cookbook/api-reference/preference/comparison/index.md)*) – The comparison to evaluate. **Returns:** *float* – -1.0 if A is preferred, 1.0 if B is preferred, 0.0 for a tie or an unrecognized output. ## Referenced by - [tinker_cookbook.preference.PreferenceModelBuilderFromChatRenderer.__call__](https://tinker-docs.thinkingmachines.ai/cookbook/api-reference/preference/preferencemodelbuilderfromchatrenderer/#preferencemodelbuilderfromchatrenderer-call)