Skip to main content
Decision models are a new class of AI model purpose-built for structured decisions. Instead of generating text token by token, a decision model evaluates a situation and returns calibrated probabilities across a fixed set of outcomes in a single call with zero generated tokens.

Primitives

Every question you ask a decision model uses one of three types:
  • Noul: A yes/no question that returns a probability between 0 and 1. Think of it as a boolean on a sliding scale. “Is this message spam?” might return 0.92, meaning a 0.92 probability that the answer is yes.
  • Choice: A pick-one-from-many question that returns a probability distribution over named options. “Which department should handle this?” might return {"billing": 0.65, "technical": 0.30, "account": 0.05}.
  • Score: A rate-on-a-scale question that returns a probability-weighted position on an ordered rubric. “How urgent is this?” with three levels might return a score of 1.85 (between “Medium” and “High”), with a probability distribution over each level.
Pick the type that matches the shape of the answer your code needs. Noul vs Score: A Noul at 0.5 means maximum uncertainty between yes and no. It says nothing about degree or intensity. If you want to measure degree (skill level, frustration, severity), use a Score with defined levels. If you need a yes/no gate, use a Noul. When the answer could fit more than one type, think about what your code does next. If it branches on a category, use a Choice. If it compares against a threshold on a continuum, use a Score. If it gates on a boolean, use a Noul.

Setup

  1. Go to console.liquid.ai. If you don’t have an account yet, register and join an organization.
  2. Navigate to Dashboard > API Keys.
  3. Create a new key and copy it. Keys are prefixed with liquid_.
Set the key as an environment variable:

Your First Call

A single API call contains three things:
  1. Model: which decision model to use.
  2. State: the context the model should evaluate. This can be plain text (a customer message, an email, a log entry) or a JSON object with structured fields.
  3. Questions: one or more typed questions, each with a name, a type, and instructions. Choice and Score questions also take criteria that define the options or levels. You can ask multiple questions in the same call, and the model evaluates them all at once.
Response:
Reading the response:
  • answers.is_complaint.noul: The probability that the answer is “yes.” Here, 0.999 means a 0.999 probability that this is a complaint.
  • usage.output_tokens: Always 0. Decision models do not generate tokens.
  • usage.input_tokens: The total tokens consumed to evaluate the state and questions.
The response contains one answer per question, keyed by the question name. A Noul answer is a single probability. Choice and Score answers also include a full probability distribution and a confidence value.

Usage Examples

Noul

A Noul question returns a single probability between 0 and 1. Your code receives a float that you can threshold to make a binary decision, use as a weight, or pass directly to downstream logic. Values near 0 or 1 express a clear answer; values near 0.5 express genuine uncertainty.
Response (answers field):
Using the result:

Choice

A Choice question returns the selected option, a probability distribution over all options, and a confidence value. confidence summarizes how clear-cut the answer is: high when one option clearly wins, lower when the probability is spread across several options. The distribution tells you not just the top pick but how much probability mass sits on the runner-up, which is useful for flagging ambiguous cases or routing to a fallback.
Response (answers field):
Using the result:

Score

A Score question returns a continuous value across an ordered rubric you define, plus the probability distribution over each level. The value is the probability-weighted position on the scale: if you define four levels (0 through 3), a score of 2.9995 means the model places nearly all weight on the top level.
Response (answers field):
Using the result:

Combining All Three Primitives

You can ask multiple questions of different types in the same call. The model evaluates all of them at once against the same state, so you get a complete decision in one round trip. This is useful when a single piece of input needs to be classified, routed, and prioritized together.
Response (answers field):
Using the result:

When to Use Decision Models

Decision models are a good fit when the answer is a structured decision: classification, categorization, routing (tickets, emails, requests), scoring, triage, content moderation, guardrails and safety checks, LLM-as-judge replacement, agent tool-call approval, and model routing or cascades. Use a language model instead for free-form text generation, creative writing, multi-turn conversation, complex multi-step reasoning, open-ended Q&A, summarization, and code generation. To move existing LLM calls to d1, see the Decision Model Guide.

Next Steps