Skip to Content

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

TypeAsksAnswer
noulA yes/no gate.noul, the probability of yes from 0 to 1.
choiceWhich one of 2–255 named options.choice, a probability for every option, and confidence.
scoreA 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.noul is 0.92, so a nurse sees the chat.
  • answers.queue.choice is "nurse_line".
  • answers.acuity.score is 1.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 state go in one request, so the state is sent once.
  • Send only what the decision needs. Trim state to 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 near 0.5, or a costly mistake to review.
  • Retry 429 and 5xx with backoff. Fix a 400 or 422 before resending; a retry won't change it.

Next steps

On this page