docs

Question types

The three question types for decisions (yes/no, choice, score) and what each returns. Sieve never generates text.

A decision request has a state (your content) and one or more questions. Each question is typed. The model reads the state once and returns a probability for every option. It does not write text.

TypeUse it forReturns
noulYes/no questions and true/false statementsnoul: the probability of yes
choicePicking one option from a listchoice: the winning option. probabilities: one per option. confidence.
scoreRating on ordered levelsscore: the expected level. probabilities: one per level. confidence. legend.

A fourth type, box (find a region in an image), is reserved. Until a vision model is available it returns 400. See Limits.

Yes/no (noul)

Ask a question or state a claim. Optional criteria say what counts as yes and what counts as no.

{
  "billing": {
    "type": "noul",
    "instructions": "Is this message about billing?",
    "criteria": {
      "true": "The message asks about a charge, refund or invoice.",
      "false": "The message is about something else."
    }
  }
}

Answer:

"billing": { "type": "noul", "noul": 0.98, "stats": {} }

A value near 1 means yes, near 0 means no, and near 0.5 means unsure. A noul answer has no confidence field.

Choice (choice)

Pick one option from criteria. Each option can have a description, or null. You can send 1 to 255 options.

{
  "tone": {
    "type": "choice",
    "instructions": "What is the tone of this message?",
    "criteria": {
      "angry": "An upset or hostile message",
      "calm": "A neutral or polite message",
      "excited": "An enthusiastic or eager message"
    }
  }
}

Answer:

"tone": {
  "type": "choice",
  "choice": "angry",
  "confidence": 0.85,
  "probabilities": { "angry": 0.9, "calm": 0.07, "excited": 0.03 },
  "stats": {}
}

Score (score)

Rate the state on ordered levels. Send criteria as an ordered list of 1 to 10 levels. The answer's score is the expected level, a probability-weighted average. It can fall between two levels.

{
  "urgency": {
    "type": "score",
    "instructions": "How urgent is this message?",
    "criteria": ["Can wait", "Needs attention this week", "Needs attention today"]
  }
}

Answer:

"urgency": {
  "type": "score",
  "score": 1.8,
  "confidence": 0.7,
  "legend": { "0": "Can wait", "1": "Needs attention this week", "2": "Needs attention today" },
  "probabilities": { "0": 0.0, "1": 0.2, "2": 0.8 },
  "stats": {}
}

legend repeats your level labels exactly as you sent them (a string, object or array). Probability keys are the level indexes as strings. Every answer also has an empty stats object, as TypeSafe responses do; SDKs ignore it.

Instructions and criteria

  • instructions can be a string, an object or an array. Objects and arrays are rendered into the prompt.
  • criteria values can be strings, objects, arrays or null. Score levels cannot be null.
  • Several questions can share one request. Each is answered on the same state, and you pay for the state once.
  • Answers use the same names as the questions. Match each answer to its question by name.

Rules

  • A request fails as a whole if the state or any question is invalid. See Errors.
  • For the OpenAI-style route (ordered list, per-question refusals), see /v1/decisions.

Next steps

Last updated