LLM_CALL.
Prerequisites: the CLASSIFY plugin is present (GET /api/plugins/CLASSIFY answers 200). Pick a backend:
SYSTEMONE(default): a System One decision model on your own Ollama (baseUrldefaults tohttp://localhost:11434). Answers carry calibrated probabilities and cost no provider tokens.LLM: any chat model, through the same access asLLM_CALL. Probabilities are the model’s own estimates.
-H "X-API-Key: $YUKTA_API_KEY" if your server has keys.
Steps
1
Classify into labels and route on them
CLASSIFY picks one label from your list. Describe every label: a small model depends on those descriptions. With routeByLabel, each label becomes an output port, plus uncertain for answers below minProbability (default 0.6). Save as session.json:session.json
tev1:0.8b is an example; use the decision model you pulled. state is what the model sees (default the whole payload, cut to 15,000 characters). To use a chat model instead, add "backend": "LLM", "provider": "anthropic", "apiKey": "decrypted:anthropic" and its model.2
Gate on a yes or no
GATE asks a yes/no question and leaves on pass when the probability of yes reaches threshold (default 0.5), else reject. Put one in front of a risky node:3
Score on a scale
SCORE rates on ordered levels (2 to 26, lowest first). With threshold it leaves on high or low.4
Ask several things at once, or watch a stream
ASKtakes up to 64 namedquestions(choice,yesno,score) in one call and writesmetadata.answers; route with aBRANCHonmetadata['answers']['sentiment']['choice'].ANOMALYandDEDUPEcompare each message with a window of recent ones (portsnormal/anomalousandunique/duplicate). By default the window is per node and per run, so a workflow started for every event never builds history; setpersist: sessionto share it across runs.
Verify it worked
bugs terminal, and the message metadata holds the decision: classification with choice, probability, probabilities, label and uncertain. The payload is unchanged. Send {"text":"hmm"}: a vague message should land on unsure. If the run fails with a model error, the Ollama endpoint is unreachable or the model is not pulled: the node fails and the node’s engine policy applies (Handle failures).
Variations
- Where the result lives. Each plugin writes to
metadata[into](classification,gate,score,answers,anomaly,dedupe); change it withinto. - Cap what the model sees.
maxStateChars(max 15,000),stateKeep: tailfor build logs where the cause is last, andonOverflow: failto reject oversize input instead of cutting it. - Latency.
keepAlive(such as30m) keeps an idle Ollama model loaded;concurrency(default 16) sets calls in flight. - Gate a tool call. Put a
GATEin front ofMCP_TOOL_CALLasking whether the arguments the model proposed are safe: Use tools and MCP servers.
Related
- Decision plugins reference for every option, port and default.
- AI and deterministic work for when to use a decision model instead of a chat model.