Wetel
Go back

A model that decides, a workflow that acts: how decision models fit AI workflows

Think of a hospital triage desk. A nurse looks at a patient for thirty seconds and says three things: how urgent it is, which department it belongs to, and whether anything needs a doctor right now. Then the hospital machinery takes over. Beds are assigned, forms are filed, a porter is called. The nurse does not write an essay about the patient, and the porter does not diagnose anyone.

Most AI workflows blur those two jobs. A step reads a customer’s message and has to decide where it goes, so the builder puts a large language model there, asks it to “answer with one word”, and then writes code to cope with the times it answers with a sentence instead. This post is about a newer kind of model built for the nurse’s job only, and about how it changes where the line sits between judging and acting.

What is a decision model, and why is it not a smaller chatbot?

A decision model is trained to answer closed questions, not to write text: you give it some input and a fixed set of questions, and it returns typed answers with a probability behind each one. It cannot explain itself and it has no chat mode. Two vendors have now shipped this shape, which is why it is worth understanding as a category rather than as one product.

TypeSafe AI’s Jev, the first one we looked at, describes itself as “smart if-statements” and names three question types: Noul (a yes/no that returns a probability, not a boolean), Score (a rating on an ordered scale) and Choice (one pick from a list). Its documentation says the model should appear “only where the system needs programmable common sense”, with code owning the control flow. OpenAI’s Decisions API, in public beta when we read its guide in October 2026, has the same three shapes under different names: predicate, score and choice, in one request to POST /v1/decisions, with the answers returned in an answers list that echoes each question’s name.

Question typeYou askYou get back
Yes/no (Noul, predicate)“Is this person reporting an outage?”A probability from 0 to 1, such as 0.91
Choice (Choice, choice)“Which team owns this: billing, technical, other?”The pick, plus a probability for every option and a confidence
Score (Score, score)“How severe is this, on these four levels?”A number that can fall between levels, plus a confidence

The part that matters is the probabilities. A chat model that answers “billing” gives you one word. A decision model that answers “billing, 84%; technical, 15%; account, 1%” gives you a word and a measure of how close the call was. That is the thing a workflow engine has never had.

Why is a generative model a poor router?

Because you pay for a paragraph you then throw away, and you get no signal about how sure it was. A classification step in a Wetel workflow today is usually an llm step with a safeguard bolted on. matchAnyOf scans the model’s reply for whichever of your candidate words appears first; extractFirstInteger pulls the first number out of the prose. Both exist because a model asked for one word sometimes writes a sentence, and the docs say plainly that no prompt wording closes that gap. (We wrote about the same problem on the extraction side in getting structured data out of a conversation.)

Those safeguards fix the format. They do nothing about certainty. matchAnyOf either finds a candidate or it does not; there is no “found it, but barely”. A message the model was unsure about and a message it was certain about look identical to the next step, so they are routed with identical confidence.

We have not measured how much time or money a classification step costs on a real Wetel workflow, so we will not put a number on it here. Both vendors claim a decision call is much faster and cheaper than a generative one (OpenAI’s page says “about 10x faster” and publishes no benchmark). Treat those as claims until someone, us included, measures them on real traffic.

How does the split work: the model judges, the workflow acts?

The model turns messy text into a number or a label; the workflow turns that number or label into a path. Each type of answer feeds a node that already exists:

flowchart LR
T[Customer message] --> D["Decision model<br/>(judges)"]
D -->|probability| C["condition / switch<br/>(threshold)"]
D -->|score| S["switch<br/>(bands)"]
D -->|choice| R["router<br/>(label match)"]
C --> H[Hand to a person]
S --> P[Priority queue]
R --> Q[Right team]

Notice what did not change. The workflow still holds all the rules, the order, the retries and the record of what happened. If the business decides that “urgent” should mean 0.9 instead of 0.85, someone edits one number in a node. No prompt is rewritten and nothing is retrained.

Where does a person come in?

At the threshold, and the threshold is a decision about your business, not a property of the model. This is the most useful idea in the whole category. Jev’s documentation suggests treating a band of low confidence, around 0.4 to 0.6, as “send to a human or a stronger model”. OpenAI’s guide makes the same point differently: it does not say how its confidence is computed or claim the numbers are calibrated, and tells you to set thresholds from labelled examples of your own, weighing the cost of a false alarm against the cost of a miss.

Read that carefully, because it is honest and it is practical. A probability from any model is only as trustworthy as it is checked. Take two hundred real past messages, write down the routing a person on your team would choose, run them through, and look at whether the confident answers really are the right ones. If a 0.9 is right nine times in ten, you have a rule you can build on. If it is right six times in ten, you have learned that before a customer did.

In a workflow, “not sure” is just another edge. A switch always has a default; point it at an approval step or a hand-off to a person, and the cases the model was unsure about go to someone who can decide. The model is never asked to be right every time. It is asked to say when it is not sure, and the workflow is built to act on that.

What would a decision step look like in a Wetel graph?

Here is a sketch of the pattern. It is a sketch: no Wetel workflow calls a decision model today. The shapes of switch and set_variable below match the node reference; the first node stands for a Custom Action that you would register yourself to call a decision endpoint, which the action step stores whole in its outputVar. The ID 17 is a placeholder.

{
"nodes": [
{
"id": "decide",
"type": "action",
"label": "Ask the decision model",
"config": {
"customActionId": 17,
"argsTemplate": "{ \"input\": \"{{userMessage}}\" }",
"outputVar": "decision"
},
"position": { "x": 0, "y": 100 }
},
{
"id": "lift",
"type": "set_variable",
"label": "Urgency as a number",
"config": {
"assignments": [
{
"variable": "urgency",
"kind": "expression",
"source": "decision.answers[0].probability",
"coerce": "number"
}
]
},
"position": { "x": 0, "y": 200 }
},
{
"id": "gate",
"type": "switch",
"label": "How sure, how urgent",
"config": {
"cases": [
{ "label": "escalate", "expression": "urgency > 0.85" },
{ "label": "review", "expression": "urgency > 0.4" }
]
},
"position": { "x": 0, "y": 300 }
}
],
"edges": [
{ "id": "e1", "source": "decide", "target": "lift" },
{ "id": "e2", "source": "lift", "target": "gate" },
{
"id": "e3",
"source": "gate",
"target": "to_person",
"label": "escalate"
},
{
"id": "e4",
"source": "gate",
"target": "to_approval",
"label": "review"
},
{ "id": "e5", "source": "gate", "target": "carry_on", "label": "default" }
]
}

The expression decision.answers[0].probability reads the first answer in the response by position, which works because the request fixes the order of the questions; reorder the questions and you must reorder the expression. The three target nodes (to_person, to_approval, carry_on) are left out for length. We checked that Wetel’s expression language reads this kind of path, but we have not run a real decision call through a real graph, so treat the sketch as the shape of the idea and test it as a draft before you rely on it.

What is live, and what is not yet?

Live today: the nodes that act on a decision. switch and set_variable are documented, the router fails loudly when nothing matches, and the action step can call an HTTP endpoint you register. The changelog says when each reached production.

Not built yet:

If you build one of these yourself first, the single most valuable thing you can do is the two-hundred-message check from the section above. It is the difference between a threshold you chose and a threshold you earned.


Share this post:

Next Post
What running an AI employee costs, and how to budget for it
Previous Post
Can I try Wetel's API in my browser before writing code?