Make a decision
Copy Page as Markdown
SubQ Snap answers questions about a state (text, an object, or an array) and
returns typed answers with probabilities your code can act on: route a ticket,
gate an action, rate how urgent something is. To generate text instead, see
Generate text.
Pick a question type
| Type | Asks | Answer |
|---|---|---|
noul | A yes/no gate. | noul, the probability of yes from 0 to 1. |
choice | Which one of 2–255 named options. | choice, a probability for every option, and confidence. |
score | A rating on 2–10 ordered levels. | score, which can fall between levels, plus probabilities and confidence. |
Example
A clinic's patient chat gets one message. Three questions decide what happens next: does a nurse need to see it, which team owns it, and how soon someone should reply.
cURLTypeScriptPython
Read each answer by its question name:
answers.escalate.noulis0.92, so a nurse sees the chat.answers.queue.choiceis"nurse_line".answers.acuity.scoreis1.86, close to "Within an hour".
See Response for the full shape.
Build reliable decision workflows
Keep your code in charge. Rules you can write down belong in code. Ask the model only for the judgment code can't make, then let code decide what happens next.
- One judgment per question. Split a broad question into narrow ones, like the gate, owner, and deadline above. Code then combines the answers.
- Ask related questions together. Questions about the same
statego in one request, so the state is sent once. - Send only what the decision needs. Trim
stateto the relevant fields, and name the field an instruction is about. - Set thresholds from your own data. Run the questions over cases you've already labeled and choose cutoffs from the results.
- Send uncertain or high-impact cases to a person. Outputs can vary between
requests, so route low
confidence, a noul near0.5, or a costly mistake to review. - Retry
429and5xxwith backoff. Fix a400or422before resending; a retry won't change it.
Next steps
- Documents and images: ask about a document's text or up to 4 images.
- Decisions API: every field, limit, and error.