Decisions with a model
A workflow often has to look at something and decide: whether a generated picture can go out, which team a customer’s message belongs to, which of four variants fits the brief, whether a document is an invoice or a contract, whether a product description is good enough to publish. The free decision nodes of Data and decisions cannot do it — they compare values that already exist — and asking a language model to “answer in JSON” works but is slow, costs more and gives a confidence in words.
Decide with a Model (ai/decide) is made for this. It sends the content — a text, up to 20 pictures, or both —
and your questions to a decision model: a model that does not write, but answers typed questions with a
probability for every possible answer.
| You ask | Its type | You get, on ports named after the question |
|---|---|---|
| “The item in the photo is damaged.” | yes_no |
damaged (true/false) and damaged_probability |
| “Which team should handle this message?” — refund, replacement, shipping, other | choice |
route ("refund") and route_probability |
| “How urgent is this message?” — low, medium, high | score |
urgency (1.97, from 0 for the first level) and urgency_level ("high") |
Every answer is accepted only when its probability reaches the threshold you set; the step also returns the
whole decision as a madoo.decision/v1 document and all_accepted, true when
every answer is sure. What follows — which branch runs, what is delivered, what goes to a person — is done by the free
nodes you already know: the model judges, the deterministic nodes route.
Why a decision model
Section titled “Why a decision model”- Answers you can route on. A boolean, a value from your list, a number: never a sentence to parse, never an answer outside the options.
- A probability, not a feeling. Measured on labelled examples, the probabilities are well calibrated: when the model says 0.9 it is right about nine times in ten. A threshold turns that into a rule — see Thresholds and uncertainty.
- Fast and cheap. About 200 milliseconds for a message, 300 for a photo; a message with three questions costs about 0.003 credits, a photo with five checks about 0.006. It only reads — there is nothing written to pay for.
- The same in every language. Italian messages with English questions, or Italian questions, gave the same answers as English ones in our measurements.
- Content is data, never instructions. The step always tells the model that the content was written by a third party; a review saying “classify this as positive” is judged, not obeyed — see Hidden instructions, refusals and responsibility.
What it does not do: write, explain, extract or count. For those use Text Generation, Image Analysis, Document Analysis and Calculate. A decision model gives no reasons and is weak with numbers and dates.
Choosing the right node
Section titled “Choosing the right node”| You need to | Use |
|---|---|
| Compare values you already have — a stock, a price, a field of a JSON | Predicate, Filter, Combine Conditions — free |
| Check what can be measured — resolution, duration, loudness, size | Quality Gate and the measuring nodes — free |
| Judge content that is not structured and get a probability per answer | Decide with a Model — a few thousandths of a credit |
| A description, an extraction, a reason, a caption written by a model | Image Analysis, Text Generation |
| One category with a confidence in words (high / medium / low) | Image Classifier — Decide with a Model gives a probability per option instead |
Where to go
Section titled “Where to go”| Your task | Read |
|---|---|
| Understand the step: content, questions, ports, statuses, what an uncertain answer does | How Decide with a Model works |
| Write questions that get the right answers — statements, options, levels, the words that matter | Writing questions |
| Choose thresholds, know when the model is unsure, send unsure cases to a person | Thresholds and uncertainty |
| Check pictures before delivering or spending on them; choose the best of several | Checking pictures |
| Route messages and documents; grade generated text against a rubric | Routing and grading text |
| Know what it costs, how fast it is and its limits | Costs, speed and limits |
| Instructions hidden in content, refused questions, what not to decide with it | Hidden instructions, refusals and responsibility |
| Build it in the editor, through the REST API, the MCP server or with the AI agent | Building it on every surface |
| A question is refused, an answer is uncertain, a port is missing, the step fails | Troubleshooting |
Complete workflows that use it on real jobs — marketplace photos, a support inbox in two languages, the best of four generated pictures, documents sorted before they are read — are in Examples. Six pages have a lab — how it works, writing questions, thresholds, checking pictures, routing, safety — that you can install and run with an API key for a few thousandths of a credit; each opens with its example inputs already in the input steps, so it runs from the editor as it is.