Docs / Workflows / Actions / Decision
Decision
Answer typed questions about supplied data. Later jobs use those answers to decide which work should run.
The material to judge
State is a set of named values drawn from the incoming event. For example, ticket can contain {{ properties.body }} and orderTotal can contain {{ properties.total }}. A value that is exactly one property reference keeps its original type. Text around the reference turns it into a string.
Attached knowledge documents join the state under knowledge, with each document’s title and content. Every question judges the same state. Decision runs on a decision model rather than a general language model and returns answers rather than generated text. A job uses the organisation’s default decision model, Jev unless an administrator changes it, or selects a permitted one: Jev, GPT-6 Luna or Clef-Flash.
Choose a question type
- Yes or no
- Use for one condition, such as whether a request needs a refund. Give the question an ID and describe what counts as yes and no. The API type is noul.
- Choice
- Use when exactly one named category should win, such as billing, technical or account. Supply 2 to 255 options and describe their boundaries.
- Score
- Use for an ordered rating, such as low, medium and high urgency. Define 2 to 10 levels from lowest to highest. The score can fall between levels.
One action supports up to 32 questions. Question IDs name the output fields, so each must be unique, begin with a letter or _, and contain only letters, digits and _.
Probability, confidence and score
A probability estimates the chance of an answer. Confidence describes how certain the engine is about a choice or score. Both use numbers from 0 to 1, but they answer different questions. A high urgency probability means yes is likely. A high choice confidence means the engine is certain about its selected category.
- urgent and urgent_answer
- For a yes/no question named urgent, action.urgent is the probability of yes. action.urgent_answer is true when that probability is at least 0.5.
- category, category_confidence and category_probabilities
- For a choice question named category, action.category is the selected option. The other fields contain confidence and the probability of each named option.
- priority, priority_level, priority_confidence and priority_probabilities
- For a score question named priority, action.priority is the probability-weighted level index, starting at 0. priority_level is the most probable level’s description. The remaining fields contain confidence and probabilities keyed by level index.
Rate a request
For example, a priority question can define Low, Medium and High as levels 0, 1 and 2. If the example probabilities are 0.1, 0.7 and 0.2, the weighted score is 1.1 and priority_level is Medium. The fractional score expresses the distribution across levels rather than another named level.
{
"category": "{{ action.category }}",
"confidence": "{{ action.category_confidence }}",
"urgent": "{{ action.urgent_answer }}",
"urgencyProbability": "{{ action.urgent }}"
}Use answers in later jobs
Decision publishes one configured output event. It does not directly choose a branch. Each later job matches that event and applies its own filters.
A billing job can require category equal to billing. A human review job can require confidence below 0.8. For a yes/no question, compare urgent with true for the built-in 0.5 cutoff, or compare urgencyProbability with a chosen numeric threshold. These example fields come from the output mapping above.
Run metadata also includes model, requestId, inputTokens and outputTokens. Those names are reserved and cannot be used as question IDs.