Browse the docs
Documentation
AI decisions: classify, score and branch with the Decision node
Most branching in a workflow is a judgment: is this a bug, which team owns it, how urgent is it. The Decision node sends those judgments to TypeSafe Jev, a model built to answer typed questions. Answers come back as probabilities with a confidence, never as prose, so the workflow decides what to do with them in plain, predictable rules.
Add a TypeSafe credential
Create an API key in the TypeSafe console, then add it on the Credentials page as a typesafe credential. Pick it in the node's Credential field. The key is encrypted and never appears in run logs.
Three question types
Each question has a key, a type and short instructions:
- Yes / no returns the probability of yes, from 0 to 1. Optionally say what counts as yes and as no.
- Choice picks one option and returns a probability for every option. Describe each option, including what it is not for.
- Score places the input on an ordered scale you list from lowest to highest, and returns a weighted score that can fall between levels.
All questions in a node go out in one request and are answered in parallel, so three questions take about as long as one. Start from a preset (Support triage, Lead score, Moderation or Sentiment) to see well-formed questions.
State: what Jev judges
State is a template and defaults to {{ input }}. Send only the fields the questions need, as named JSON fields rather than one long string:
{
"message": "{{ trigger.body.text }}",
"plan": "{{ nodes.crm.output.plan }}"
}Branch on the answers
Branch on chooses which output ports appear on the node. The out port always fires with every answer.
- noul: fires
yesornoat the yes threshold you set. - choice: one port per option of the chosen question.
- bands: named ports by minimum score from 0 to 1, on one question or on the scorecard.
- rules: ordered expressions over the answers; the first match fires, otherwise
default.
[
{ "port": "escalate", "expression": "answers.is_bug.value > 0.8 and answers.priority.value >= 1.5" },
{ "port": "billing", "expression": "answers.area.value == 'billing'" }
]Confidence and the uncertain port
Choice and score answers carry a confidence from 0 to 1. For yes/no, confidence is |2p - 1|, so 0.5 means no idea. When the confidence behind the branch is below Minimum confidence, the node fires uncertain instead of guessing.
Match the threshold to the risk: 0.5 for routing, 0.8 or more before anything that cannot be undone. Tune it on your own runs; the output panel shows each answer's probabilities and confidence.
Scorecards
A scorecard combines answers into one composite score from 0 to 1. Each row names a question and a weight. Yes/no counts its probability, a score counts its position on the scale, and a choice counts the values you give each option.
[
{ "question": "fit", "weight": 2 },
{ "question": "intent", "weight": 2 },
{ "question": "decision_maker", "weight": 1 }
]Output
{
"answers": {
"area": { "type": "choice", "value": "billing", "confidence": 1.0,
"probabilities": { "billing": 1.0, "technical": 0.0 } },
"priority": { "type": "score", "value": 0.85, "confidence": 0.62 }
},
"composite": 0.43,
"branch": "billing",
"confidence": 1.0,
"uncertain": false
}Use it as an agent tool
Drag the node's bottom handle to an Agent's tools port. The agent passes text and gets the answers back, which suits checks such as "is this request safe to run?" before an action.
Benchmarks
On 40 labelled support tickets, run 3 times (120 live requests to jev-1.13, 3 questions each):
- Team routing (4-way choice): 100% correct, mean confidence 0.97.
- Bug or not (yes/no): 88% correct.
- Median latency 0.70s, p95 0.82s; one question took the same time as three.
- About 490 input tokens per request; output tokens are free.
The set is small and written in-house, so treat it as a sanity check, not a guarantee. Measure on your own data before trusting a threshold.
Writing good questions
- One judgment per question. Split "is this an urgent billing bug?" into three.
- Keep questions independent: never feed one answer into another question.
- Keep deterministic checks, such as dates and amounts, in an If node instead.
- Describe choice options by contrast, using the same words across options.
Keep reading
- Decision node: typed judgments with TypeSafe JevThe Decision node asks TypeSafe Jev yes/no, choice and score questions, then branches on calibrated probabilities, a weighted scorecard or rules.
- AI lead scoring workflowScore inbound leads with the Decision node: TypeSafe Jev rates fit and intent, a weighted scorecard sorts them into hot, warm and cold, and unclear leads go to an agent.
- Templates and expressions: pass data between nodesPass data between workflow nodes with Jinja templates: read run inputs and upstream outputs, branch on expressions, and keep raw values intact.
Build it on the canvas
Create a free account, describe the workflow or wire it yourself, and run it in the browser.