Label types & values

Settings, validation rules, and the score value shape for each label type

A label has one of five types. The type fixes the settings it needs and the control an annotator sees. Every submitted answer is written into the label’s score as JSON, in Score.value, and this page shows the shape that value takes for each type, plus the checks re-applied when a value is submitted. For which type to pick, see Labels; for the steps to create one, see Create a label.

Every setting listed below is required by the backend; there’s no default value for any of them. The prefills shown in each table are what the create drawer fills in for you, not defaults the API falls back to.

Note

Every type can also turn on allow_notes, which lets the annotator attach a free-text note alongside their answer. The note is stored in the score’s notes field, separate from Score.value.

Categorical

SettingWhat it doesConstraintCreate drawer prefills
optionsThe list of options the annotator picks from, each an object with a label field, for example [{"label": "Good"}, {"label": "Needs work"}]Two or more, each non-empty, and unique once case differences are ignoredRequired, no default
multi_choiceWhether the annotator can pick more than one optionNonefalse (single choice)

Creating a categorical label also requires additional auto-annotation settings: rule_prompt, auto_annotate, and strategy.

The annotator picks from the options you defined, one or several depending on multi_choice. The stored value is always an object with a selected array of the picked option labels: a single-select answer holds one label, for example {"selected": ["Good"]}; a multi-select answer holds more than one, for example {"selected": ["Good", "Needs work"]}.

Numeric

SettingWhat it doesConstraintCreate drawer prefills
minThe lowest value on the range0 or greater0
maxThe highest value on the range0 or greater, and greater than min10
step_sizeThe increment between values the annotator can land onGreater than 01
display_typeWhether the annotator sees a slider or a row of buttonsslider or buttonslider

The annotator sees a slider or a row of buttons, depending on display_type, stepping from min to max in step_size increments. The chosen value is stored as {"value": 7.5}.

Text

SettingWhat it doesConstraintCreate drawer prefills
placeholderPlaceholder text shown in the empty fieldNoneEnter your feedback...
min_length / max_lengthThe minimum and maximum length allowed for the submitted textmin_length must be less than max_length0 / 500

The annotator gets a free-text field showing placeholder when empty. The entered value is stored as {"text": "Needs a citation for the second claim"}.

Star Rating

SettingWhat it doesConstraintCreate drawer prefills
no_of_starsHow many stars the annotator seesGreater than 0; the create drawer caps it at 10, though the backend has no upper bound5

The annotator sees a row of no_of_stars stars to tap. The number of stars picked is stored as {"rating": 4}.

Thumbs Up/Down

No settings beyond the type itself.

The annotator sees a thumbs up / thumbs down toggle. The pick is stored as {"value": "up"} or {"value": "down"}.

Checks applied on submit

Every value is checked again against the label’s settings when it’s submitted, not just when the label is created:

  • Categorical: every selected option must be one you defined, and if multi_choice is off, only one option can be selected
  • Numeric: the value must fall within [min, max], and must land on a step_size increment unless it’s exactly max
  • Text: the value’s length must fall within [min_length, max_length]
  • Star Rating: the value must be a whole number between 1 and no_of_stars
  • Thumbs Up/Down: the value must be up or down

Keep exploring

Was this page helpful?

Questions & Discussion