Choice
Select one named option and inspect the distribution across the full set.
Define the options
Set type to choice. Criteria is an object whose keys are the possible answers. Values describe when each option applies; null is allowed when the key is sufficient.
1{
2 "type": "choice",
3 "instructions": "Which team should investigate?",
4 "criteria": {
5 "operations": "Failed jobs, missing data, or service outages",
6 "accounts": "Access, invitations, or account settings",
7 "other": "Requests outside these categories"
8 }
9}Read the result
1{
2 "type": "choice",
3 "choice": "operations",
4 "probabilities": {
5 "operations": 0.92,
6 "accounts": 0.05,
7 "other": 0.03
8 },
9 "confidence": 0.88
10}| Field | Meaning |
|---|---|
choice | A criteria key with the highest probability. |
probabilities | Every criteria key mapped to a number from 0 to 1. |
confidence | A provider-defined statistic derived from the distribution. |
These numbers are illustrative. In a tie, the draft permits any option sharing the maximum probability; clients must not infer a ranking from JSON property order.
Cover the possible inputs
Add an other option if your categories may miss an input. Without it, a model must select from the supplied set. Split overlapping decisions into separate questions when multiple labels can apply.