Skip to main content
Version: Current

Decision AI Choice

Decision AI Choice is a Choice node whose case the model decides. It asks Jev the same questions as Decision Model and sends the event to an output picked by the answer to one of them, the Route by question. Each output is an edge of its own, so no Choice or Filter is needed after the node.

"Choice" means two things on this page: the node, which works like the built-in Choice, and the choice question type, whose options can become its outputs.

When to use it​

Use Decision AI Choice when the scenario branches on one answer of the model: the intent of a message, whether a refund is requested, how urgent a case is. Use Decision Model when the decision needs several answers together, for example a Decision Table over the intent and the urgency, or when the answer only enriches the event.

Parameters​

The node has the parameters of Decision Model - Integration, Model, Context, Questions, Result mode and Supersede key - and these:

ParameterShown whenValue
Route byQuestions is validThe question whose answer picks the output
Yes fromRoute by is a yes/no questionA probability from 0 to 1, by default 0.5
BandsRoute by is a score questionOutput names, each with the score its band starts from

A choice question that takes its options from data can't be routed by: its options are known only for each event, and the outputs must be known when the scenario is validated. It can still be asked and read on every output.

Outputs​

Route byOutputsAn answer goes to
Choice questionOne per option, in their orderThe option the model chose
Yes/no questionyes, noyes when its probability of yes is at least Yes from
Score questionOne per band, in their orderThe last band whose start the score reaches

In Detailed result mode the node also has an error output, for calls that failed. No other output may then be named error. In Assessment mode a failed call fails the event, as in Decision Model.

The first output is the main one. The output variable holds the same value on every output: the assessment in Assessment mode, the detailed result in Detailed result mode, whose assessment is null on error. The other questions of the call are read on every output, for example the urgency score on the branches of an intent routing.

An output that is not connected drops what goes to it. Connect error in Detailed result mode, or failed calls are lost without a trace.

When an option or band is renamed, removed or moved, an edge stays on the output it was drawn from and is marked with an error until it is connected again. Moving the first one changes the main output.

Thresholds​

The model reports a probability of yes and a score, not a decision. Yes from and Bands make the decision, so pick them as for any threshold: from labelled examples, not from the model's confidence.

A score is a level index weighted by the probability of each level: 0 for the lowest level, up to one less than the number of levels. The first band starts at 0. When Route by switches to a score question, Bands is filled with one band per level, each starting halfway from the level before it, and named after the level; rename the outputs as needed.

{
{output: 'routine', scoreFrom: 0},
{output: 'shift', scoreFrom: 0.8},
{output: 'immediate', scoreFrom: 1.6}
}

Engines​

On Flink the node runs as two operators of its own: an asynchronous call to the model, bounded by the integration's concurrency and queue limits, and a split into the outputs. A call that outlasts the scenario's timeout is cancelled and is a failed call, routed to error in Detailed result mode. On the Lite engine the calls of a batch run concurrently, in the order of the batch. In Lite streaming, calls beyond the integration's concurrency and queue limits wait for their turn; in request-response they fail as overloaded.

Test runs record the options a question took from data, as in Decision Model.