choice question picks one option from a list you define: which queue owns a ticket, which language a message is in, which product a review is about. You get back the chosen option, a probability for every option, and a confidence. This page is for developers who classify or route items and want to know how sure each classification is.
The shape
The keys of
criteria are the answer names. They come back in choice and as the keys of probabilities, and other questions use them in ask_if to depend on this one.
Option rules
Admission does not check whether each option name works as a single token. A name that does not fails later with
503 decision_unavailable. Keep names short, single, common words (billing, technical, sales, other) and put the detail in the description.
Include a way out
When an item might fit none of your options, add one that catches it, such as"other": null. Without it, every item is forced into one of your real options, and the probabilities are spread only over those.
Ask it
This run asks onechoice question about a support ticket.
Read the answer
In the ticket-triage run from the decision runs guide, thebucket question came back as:
So the ticket goes to
billing, with 0.71 on billing and 0.29 on everything else.
Use the probabilities, not just the choice
choice alone throws away how close the call was. A ticket at 0.71 billing and one at 0.99 billing both say "choice": "billing", but only one of them is safe to route without a second look.
probabilities directly:
- Act on one option only. When only one option triggers an action, compare that option’s probability with its own threshold, rather than waiting for it to win.
- Top two. When the two highest probabilities are close, show both to the reviewer.
- Watch
other. A rising share of items whereotherwins tells you your options no longer cover your traffic.
draws from 2 to 8. With more than one draw, the run’s cost_basis is estimated.
Choice or several noul questions
What goes wrong
Related
- Decision questions - how noul, choice and score questions fit together.
- Decision runs - every request field, the full response and the costs.
- Conditional questions - ask a follow-up only for one option.
- Playground - try a choice question in the console with
+ choice. - Limits - the per-request limits that apply to every run.