Glossary

Choice question

A choice question asks Laya to pick one answer from a list you define, such as a department, and returns the pick plus a probability for every option.

Swiss-hosted inference. Nothing you send is ever stored.Swiss data residency

What Choice question means

A choice question is Laya's single-label classification primitive, and one of the three question types of the Jev-style /v1/systemone protocol. You give it instructions and a set of options; it returns exactly one of them.

Shape

criteria can be a dict of label to description, or a plain list of labels (normalised to a dict with no descriptions):

Show technical details· json sample
json
"intent": {
  "type": "choice",
  "instructions": "What does the customer want in `message`?",
  "criteria": {
    "refund": "money returned or a duplicate charge reversed",
    "technical_help": "a bug, outage or integration problem",
    "other": "none of the other options fits"
  }
}

The answer contains choice (the argmax label), probabilities (one entry per label, summing to 1), confidence (normalised-entropy confidence, 0 to 1) and an action block.

Designing good choice questions

  • Make options mutually exclusive and include an explicit other. The softmax must put its mass somewhere.
  • Write short, distinctive descriptions. Options share the head_max_len budget (192 tokens English, 256 multilingual) and each is capped at 48 tokens.
  • Keep the label count moderate. Laya is strong at small label sets (AG News, 4 labels: 0.950) and weak at large ones at default settings (Banking77, 77 labels: 0.425). For 20+ options, use a two-step coarse-to-fine choice.
  • Use a descriptive key rather than a letter unless you are working around noul bias, in which case neutral keys like A/B help.

If more than one label can apply, ask several noul questions instead. See choice, score and noul and the intent detection use case.

How Choice question connects to the rest of the vocabulary.