Decision types
Every question has a type. There are three, and they cover most of what a system needs to decide.
choice: pick one option
Use it when there is a closed set of answers: which team, which category, which action, where the door is. Options go in criteria, with or without a description. Descriptions help when the option name alone is ambiguous.
{
"type": "choice",
"instructions": "What is the reason for the contact?",
"criteria": {
"delivery": "delay, lost parcel, tracking, wrong address",
"payments": "charges, Pix, bank slip, card, refunds",
"account": "login, signup, lockout, personal data",
"other": null
}
}
It works with up to 400 options, and accuracy on long lists is handled by the Y0-system itself: send the labels as they are and get the answer with them. Include an escape option such as "other" when the real world has cases outside the list, or use allow_none.
allow_none: when no option fits
With "allow_none": true on the question, the Y0-system also weighs a hidden option, "none of the above". The answer then carries none_probability, the probability of that option. When it reaches none_threshold (default 0.5), choice comes back as null, confidence is 0 and reason says "no option covers the input". Below the threshold the "none" mass is redistributed over your options and the answer is normal, but none_probability is still there so you can apply your own cut.
{
"type": "choice",
"instructions": "Which team should handle this?",
"allow_none": true,
"none_threshold": 0.3,
"criteria": { "delivery": null, "payments": null, "account": null }
}
With long lists the hidden option shares probability with many others, so a threshold below 0.5 usually makes more sense. Do not combine allow_none with an escape option of your own such as "other", "none" or "n/a": the call is refused with escape_option_conflict, because both would compete for the same vote. Questions with allow_none are decided one at a time, outside the batch.
noul: yes or no
Use it for binary questions: is it damaged, is it urgent, is the document complete, did the agent finish. The answer is the probability of yes, in noul, between 0 and 1. Pick the threshold in your code: 0.5 for balanced cases, higher when a false positive is expensive.
{ "type": "noul", "instructions": "Is this product damaged?" }
score: a level on a scale
Use it when the answer is a level: severity, priority, risk, quality. Levels go in criteria, in order from lowest to highest. The answer brings score, the expected value over the scale, handy for sorting, legend with the meaning of each level, and the distribution in probabilities.
{
"type": "score",
"instructions": "How severe is the reported problem?",
"criteria": ["low", "medium", "high", "critical"]
}
Writing the question
- Say what matters and what to ignore. "Consider only the customer's text, not the history" changes the answer.
- Define options by what sets them apart. Two similar options with vague descriptions split the probability.
- Include an escape option ("other", "cannot tell") when the real world has cases outside the list.
- Test with real cases and watch
confidence: low values point to ambiguous questions or redundant options.