Skip to main content
A Krun question has a type, its decision primitive. Krun One answers four:
Each answer has the same type as its question, so your code can branch on it.
context can also hold images, documents and audio. See Multimodal inputs.

Choosing a primitive

  • Several alternatives, no order between them (departments, intents, tools): choice.
  • A single yes/no proposition (needs a human? likely fraud? should retrieve? should retry?): noul. It returns one probability, which is easier to threshold than a two-option choice.
  • A quantity on a scale (severity, urgency, quality, risk, sentiment intensity): score. The levels are ordered, so “off by one level” and “off by four levels” are different mistakes, and the answer is an expected level you can compare, average or threshold.
  • Any number of labels from one set (issue types in a complaint, elements present in a document): multi. Each option gets its own probability, and they don’t sum to 1.
If the options have a natural order, use score, not choice. If there are only two outcomes and one is the “positive” case, use noul.

Mixing primitives

A request can mix the four types, up to 16 questions. They are answered together, in one model job, and each question is scored independently: adding a score question does not change the answer to a choice question. See Multiple decision primitives.

Billing and usage

One question is one decision, whatever its type. usage.input_tokens is the real token count of each question’s sequence, summed. See Usage and tokens.