Decision plugin reference
A decision plugin asks a model a constrained question about a message and writes the answer to a metadata key; the payload is not changed. All six are in moduledecision, which depends on llm-call.
Options every decision plugin accepts
- Default node timeout:
timeoutplus 5 seconds. - Errors:
Decision model failed: <cause>;The model gave no usable answer to '<question>';The state is <n> characters, over maxStateChars <max> (onOverflow is fail). A failed decision fails the message; use the node’senginepolicy to retry or route it (see Node options).
Window options (ANOMALY, DEDUPE)
Shared windows are kept in memory, at most 1000 at a time (least recently used dropped first).
CLASSIFY
Picks one label.
- Output ports:
default; withrouteByLabel, one port per label plusuncertain. - Result (
intodefaultclassification):{choice, probability, probabilities, label, uncertain}.
GATE
Asks a yes/no question.
- Output ports:
pass,reject. - Result (
intodefaultgate):{probability, passed}.
SCORE
Rates the message on an ordered scale.
- Output ports:
defaultwithoutthreshold;high,lowwith it. - Result (
intodefaultscore):{score, level};scoreruns from 0 to levels-1, probability weighted, andlevelis the nearest level. - Errors:
levels needs 2 to 26 entries.
ASK
Asks up to 64 named questions in one model call.
- Output port:
default. - Result (
intodefaultanswers): one entry per question name, shaped like theCLASSIFY,GATEandSCOREanswers. Route on it withBRANCH. - Errors:
At most 64 questions;Question '<name>' must be a map;Question '<name>' needs two or more criteria;Question '<name>' needs two or more levels;Question '<name>' has unknown type '<type>' (choice, yesno or score).
ANOMALY
Judges whether a message is unusual compared with the last window messages.
Window options apply.
- Output ports:
normal,anomalous. - Result (
intodefaultanomaly):{probability, warmup}. - Errors:
window must be 1 or more and minHistory 0 or more.
DEDUPE
Judges whether a message means the same as one of the last window unique messages.
Window options apply.
- Output ports:
unique,duplicate. - Result (
intodefaultdedupe):{duplicate}for a unique message;{duplicate, duplicateOf, probability}for a repeat. - Errors:
window must be 1 or more.