Documentation

This or That Question

Article

This or That Question

When and Why to Use

Use this to ask binary forced-choice questions across multiple comparisons. It's ideal for:

  • Preference testing between paired items
  • Quick-fire brand or concept comparisons
  • Engaging users with fast-paced choice tasks

Supports randomization and media-based comparisons.

Chat Experience
  • Each pair appears as a row with two side-by-side buttons or tiles
  • Users select one item at a time
With imagesWithout images
Markdown ImagesMarkdown Many Options
Traditional Experience
  • All pairs displayed in grid format
  • Responsive to keyboard or remote selection
  • Layout adapts to show multiple pairs simultaneously
With images, mobile optimizedWithout images
485779751 fa3aafb5 e23d 4f53 ad35 1ea905fe086c485779850 e60b0b0a 09f7 4e57 b776 63ae9ffa3f9e
Configuration Options
OptionTypeRequiredDefaultDescription
questionstringyes-The main prompt for the task
row_options`List[List[strMediaItem]]`yes-
randomizeboolnoFalseShuffle the order of rows
randomize_columnsboolnoFalseShuffle left/right order within each pair
defaultDict[str, str]norandom choicesDefault test responses per pair
recodesDict[str, str]no-Map raw values to grouped outputs
imageMediaItemno-Top-level image shown above the task
image_label_fieldstrno-Label to show above any media items
show_image_labelboolnoTrueWhether to show labels on image tiles
image_sizeTuple[int, int]no-Size of displayed images
custom_validator`Callable[[Dict[str, str]], strNone]`no-
tagss.tag()no-Used for token substitution and reporting
Example Code
s.this_or_that_question( "Which of the following do you prefer?", row_options=[ ["Apples", "Oranges"], ["Coke", "Pepsi"], ["Dogs", "Cats"], ["Winter", "Summer"] ] )

With recodes:

s.this_or_that_question( "Which of the following do you prefer?", row_options=[["Netflix", "Disney+"], ["Prime", "Apple TV"]], recodes={ "Netflix": "streaming", "Disney+": "streaming", "Prime": "ecommerce", "Apple TV": "streaming" } )

With custom validator:

s.this_or_that_question( "Choose your favorite in each pair", row_options=[["Day", "Night"], ["Hot", "Cold"]], custom_validator=lambda d: "Please vary your responses" if len(set(d.values())) == 1 else None )
Notes
  • Each row_options entry must contain exactly two items
  • Randomizing column order helps reduce left/right bias
  • recodes simplify grouped reporting or segmentation
  • Use custom_validator to enforce answer patterns or detect straight-lining