Skip to main content
A score question rates the state on an ordered scale you define: how upset a customer is, how severe a bug is, how well a résumé matches a role. Because the levels have an order, you get back a single number between them, not just a label. This page is for developers who need a graded judgement they can sort, average or compare with a threshold.

The shape

The level names are the answer names. Other questions use them in ask_if to depend on this one, for example {"tone": ["furious"]}.

Level rules

The console Playground limits a score question to 2 to 9 levels, and numbers them from 1 on screen. The API accepts 2 to 20 levels and always numbers them from 0.
As with choice options, admission does not check whether each level name works as a single token. A level name that does not fails later with 503 decision_unavailable. Use short, single, common words. Order the levels so that each one is clearly more than the one before it. A scale whose middle levels overlap in meaning gives you a score that drifts between them.

Ask it

This run asks one score question about a support ticket.

Read the answer

In the ticket-triage run from the decision runs guide, the tone question came back as:

Work the example

The score is the probability-weighted average of the level indexes:
1.34 sits between level 1 (annoyed) and level 2 (furious), a little closer to annoyed. The single most likely level is furious at 0.46, but annoyed is close behind at 0.42. That split is what the score captures: a label on its own would say “furious” and hide how close the call was.
probabilities is keyed by index strings ("0", "1", "2"), not by your level names. Look names up in legend. And score starts at 0: on a three-level scale, the top level is 2, not 3.

Use the score

The score is a number on your scale, so you can compare it with a level boundary, sort by it, or average it over many items.
  • Compare with a boundary. “Escalate when the score is at least 1.5” treats the scale as continuous. “Escalate when P(at least furious) is above your threshold” uses the probabilities directly. Pick thresholds from your own labelled data.
  • Sort. Order a queue by score to see the most severe items first.
  • Average. The mean score over a day’s tickets is a steadier signal than a count of labels.
  • Distrust an answer with answered_within_labels: false, whatever its score, and send it to a person.

Score or choice

Use a score when the levels have an order and the distance between them means something. When they are just different categories, a choice is the right shape: the average of “billing” and “sales” is not “technical”.

What goes wrong