# Playground decisions

> Try a decision model in the console.

## Playground decisions

Ask a decision model typed questions about a state, and get probabilities back instead of prose. It is the place to shape questions and tune thresholds before you call decisions from code.

1. Pick a decision model at the top right. A model that is temporarily unavailable is listed but cannot be picked.
2. Write the **State**: the text or JSON the questions are about. Or press a preset under **Start from:** (Agent guardrail, Support routing, Moderation, Lead score, Is the task done?) to load a worked example.
3. Add **Questions**: yes or no, a choice, or a score.
4. Press **Decide**. The **Answers** appear beside the questions.

**View code** shows the same decision as code, with the same key and credits as chat.

### Reading an answer

Probabilities sum to 1 across a question's options. Confidence says how decisive the spread is: 1 is a clear winner, 0 is an even split. Set a threshold per question to decide when your code acts on its own and when it asks a person.

### What it costs

A decision is billed per input token only. Decisions run here are billed from your credits through the **Playground** key, like Playground chat, and are not saved. The line under the answers shows the input tokens, the cost, the time and the model version that answered. **Open in activity** opens the request.

### Versions

The Playground always runs a model's latest version. Once you have tuned thresholds, pin a version in your code so answers stay stable. When the model has a version to pin, **View code** names it.

When no decision model is available, you can still write the state and questions. Decide turns on as soon as one is.

## State

What the questions are about: an email, a support ticket, a tool call an agent wants to make, a record from your database. Write it as plain text or as JSON.

To point a question at one field of a JSON state, name the field in backticks, like `` `amount_usd` ``.

The state is input to the model, so a longer state costs more input tokens. A state longer than the model accepts is refused, and nothing is billed: shorten it, or ask fewer questions.

A decision needs a state: **Decide** asks for one when it is blank.

## Questions

Each question asks one thing about the state. Add one with **+ Yes / No**, **+ Choice** or **+ Score**:

- **Yes / No** answers with the probability of yes. Describe the question, and optionally what makes it true and what makes it false.
- **Choice** picks one of the options you list. Give each option a short name, and optionally a **Choose when…** line that says when it applies.
- **Score** places the state on levels you write, lowest to highest, up to 10 levels.

Every question has an answer key, the name its answer comes back under. Keys must be unique within a decision. You can ask up to 64 questions at once, and each one adds input tokens.

**Form** edits questions as cards. **JSON** shows the whole request, model, state and questions, as your code would send it, and you can edit it there. Switching back to Form applies the edit; JSON that does not parse is flagged and has to be fixed first.

## Answers

One card per question, under its answer key.

- **Yes / No**: the probability of yes, from 0 (no) to 1 (yes).
- **Choice**: a bar for each option with its probability; the most likely option is in bold. The card shows the answer's confidence.
- **Score**: a bar for each level with its probability, plus the score itself and the confidence.

Probabilities sum to 1 across options. Confidence says how decisive the spread is: 1 is a clear winner, 0 is an even split.

**Add a threshold** sets the point where your code should act on its own rather than ask a person: yes at or above a value, confidence at or above a value, or a score at or above a level. Drag the slider and the card says which way this answer falls. **Remove threshold** takes it away. Thresholds are for tuning here: they are never sent to the model, and your code applies its own.

**Preview** shows the cards; **JSON** shows the answers as JSON, the shape your code reads.
