Documentation

Rating Question

Article

Rating Question

When and Why to Use

Use this to capture how strongly a respondent feels about a given item or concept on a numeric scale. Ideal for:

  • Measuring attitudes or satisfaction
  • Capturing degrees of liking, agreement, or importance
  • Top-box / bottom-box analysis with recodes
Chat Experience
  • Slider or button-style input depending on style
  • Labels shown inline or at ends of the scale
  • Optional "Don't know" button at the bottom if configured
Button style with imageSlider styleStar style with image
Button Markdown ImagesSlider Plain TextStar Plain Text Images
Traditional Experience
  • Input rendered more horizontally with larger interactive area
  • Works well with remote or keyboard input
Button style with an imageSlider style, mobile optimizedStar style with an image
Button Markdown Images483897894 bf92ff56 44b8 4153 bf3f 1e050da57145Star Plain Text Images
Configuration Options
OptionTypeRequiredDefaultDescription
questionstringyes-Text prompt shown to respondent
number_of_pointsintno5 or label countNumber of points on the scale
first_pointintno1 or first labelStarting value on the scale
stylestringnoslider"slider", "button", or "star"
labelsDict[int, str]no-Labels for specific points on the scale
imageMediaItemno-Optional image shown above the question
defaultintnorandomDefault value used in test mode
dont_know_optionstrno-Adds a "Don't know" option with this label
recodesDict[str, str]no-Map numeric responses into grouped outputs
custom_validator`Callable[[int], strNone]`no-
tagss.tag()no-For token substitution in text and grouped reporting
Example Code

Basic 5-point slider:

s.rating_question( "How much do you like this product?", number_of_points=5, style="slider", labels={ 1: "Dislike", 3: "Neutral", 5: "Like" } )

With recodes:

s.rating_question( "How much do you like this product?", number_of_points=5, recodes={ "1": "dislike", "2": "dislike", "3": "neutral", "4": "like", "5": "like" } )

With "Don't know" and tag token:

s.rating_question( "How do you rate {brand} cars?", number_of_points=5, labels={ 1: "Dislike", 3: "Neutral", 5: "Like" }, dont_know_option="Don't know", s.tag(brand="Ford" ))
Notes
  • slider and button styles include numeric values with labels
  • dont_know_option responses are recorded as -999
  • Use recodes to collapse scale points for reporting
  • custom_validator is helpful for attention checks or edge case handling