# Choose an option

> Route or classify text using named options. Read the selected key and the probability of every alternative, then choose the action in your backend.

Source: https://opendecisio.com/docs/concepts/choice/

Use a choice [question](https://opendecisio.com/docs/glossary/#question) when your application knows the possible answers, such as the teams that can handle a support ticket. With a [decisio server running](https://opendecisio.com/docs/), paste this request into a terminal:

 

```
curl --fail-with-body -sS --max-time 60 http://127.0.0.1:8000/v1/systemone \
  -H 'Content-Type: application/json' \
  -d '{
  "state": "My card keeps getting declined when I renew.",
  "questions": {
    "category": {
      "type": "choice",
      "instructions": "Which team should handle this ticket?",
      "criteria": {
        "billing": "Invoices, payments and refunds",
        "access": "Login, passwords and permissions",
        "bug": "The product behaves wrongly"
      }
    }
  }
}'
```

 

Run against the CPU stand-in at v0.46.0 on 2026-11-13: the answers are the stand-in's, not the default model's.

 

[Download the request as JSON](https://opendecisio.com/examples/questions/choice.json) to reuse it in your own client. This example uses the decisio endpoint; [Ollama’s guide](https://opendecisio.com/docs/deploy/mac/#on-a-laptop-with-ollama) gives its port and required model name.

 

## Give the options clear boundaries

 

The key `category` names this question and its answer. The `criteria` object maps [option](https://opendecisio.com/docs/glossary/#option) keys to descriptions; the selected key is ready for your code to use.

  

| Option | What belongs here |
| --- | --- |
| `billing` | Invoices, payments and refunds |
| `access` | Login, passwords and permissions |
| `bug` | The product behaves wrongly |

 

Use descriptions to resolve overlap, such as a declined payment versus a sign-in failure. When the keys explain themselves, their descriptions can be `null`. If your inputs can fall outside the categories, add an option such as `other` and define when to use it.

 

## Read the answer

 

Read `answers.category.choice` and `answers.category.probabilities` from the JSON response. For example, these are illustrative fields from one answer, with chosen [probabilities](https://opendecisio.com/docs/glossary/#probability) rather than a measured model result:

 

```
{
  "type": "choice",
  "choice": "billing",
  "probabilities": {"billing": 0.8, "access": 0.05, "bug": 0.15}
}
```

 

A shape to fill in, not a command to run.

 

`choice` is the key with the largest probability. The probabilities cover all supplied options and add up to 1, apart from rounding. Here, billing has probability 0.8, while the two alternatives together have probability 0.2.

 

[Figure: One selected key, with the alternatives alongside it. Illustrative billing 0.80, access 0.05 and bug 0.15. Billing is selected; the values sum to 1.]

  Explore the request and answer fields 

[Figure: Find the field your code sends or reads. A request beside its answer. Four controls identify the text, question, options and answer. All field explanations are also available below.]

  

## Map the key to an action

 

Your backend maps `billing` to its billing queue, `access` to its access queue and `bug` to its bug queue. Keep a review path for cases your routing policy does not accept, and check the HTTP status before reading any answer. [Use the probabilities](https://opendecisio.com/docs/concepts/probabilities/) explains how to choose that policy and check it on labelled examples.

 

## Good to know

 

- A choice accepts up to 255 options; more returns status 422.
- Option order does not define a ranking. Use a [score](https://opendecisio.com/docs/concepts/score/) for levels from low to high.
- Adding or changing options changes the question; evaluate the revised question before automating it.

 

## What next

 

- [Ask yes or no](https://opendecisio.com/docs/concepts/noul/): check one condition in the same text.
- [Use the probabilities](https://opendecisio.com/docs/concepts/probabilities/): decide when your code should route or review.
- [Support routing](https://opendecisio.com/docs/use-cases/support-routing/): a complete application recipe.
