Question Nodes
Ask the decision model a yes/no, choice or score question and branch on the answer's probability, with an uncertain route when no answer comes.
3 nodes.
| Node | Registry path |
|---|---|
| Ask Decision Model | decisions/AskDecisionModel |
| Decide Yes/No | decisions/DecideYesNo |
| Decision Model Status | decisions/DecisionModelStatus |
Ask Decision Model
decisions/AskDecisionModel
Ask the decision model one question about a subject and read the answer as probabilities. Nothing is sent while the decision model is off; the node then outputs available=False and the reason in failure_code.
Question types:
- noul: yes/no; the answer is p_true
- choice: pick one of
options(dict of option id to description); the answer is selected - score: rate on
rubric(list of level descriptions, lowest first); the answer is value
Inputs
| Input | Type | Description |
|---|---|---|
state |
any |
graph state; the node sends the request only when a value reaches it |
subject |
str,dict,list |
text or data the question is about (optional) |
instructions |
str |
(optional) the question |
true_criteria |
str |
(optional) when the answer is yes (noul, optional) |
false_criteria |
str |
(optional) when the answer is no (noul, optional) |
options |
dict |
(optional) choice options (choice) |
rubric |
list |
(optional) score levels (score) |
Outputs
| Output | Type | Description |
|---|---|---|
state |
any |
graph state |
available |
bool |
True when the decision model answered |
failure_code |
str |
why there is no answer (disabled, unavailable, timeout, oversize, invalid_request ...), or None |
request_id |
str |
the Decision Log request id |
p_true |
float |
probability of yes (noul) |
selected |
str |
the most probable option (choice) |
value |
float |
the expected score (score) |
probabilities |
dict,list |
probability per option (choice) or per rubric level (score) |
confidence |
float |
the model's confidence (choice, score) |
answer |
dict |
the full answer as a dict |
Properties
| Property | Type | Default | Description |
|---|---|---|---|
question_type |
str |
"noul" |
What kind of answer the question has. Choices: noul, choice, score. |
label |
str |
"Node graph question" |
Name of the request in the Decision Log |
instructions |
text |
"" |
The question |
true_criteria |
text |
"" |
When the answer is yes (noul) |
false_criteria |
text |
"" |
When the answer is no (noul) |
options |
dict |
{} |
Option id to description (choice) |
rubric |
list |
[] |
Level descriptions, lowest first (score) |
Decide Yes/No
decisions/DecideYesNo
Ask the decision model a yes/no question and route on the answer.
yes is active when p_true reaches the threshold, no when 1 - p_true
reaches it, and uncertain otherwise, including when the decision model is
off or fails. Wire uncertain to a fallback, for example an LLM query.
Inputs
| Input | Type | Description |
|---|---|---|
state |
any |
graph state; the node sends the request only when a value reaches it |
subject |
str,dict,list |
text or data the question is about (optional) |
instructions |
str |
(optional) the question |
true_criteria |
str |
when the answer is yes (optional) |
false_criteria |
str |
when the answer is no (optional) |
threshold |
int,float |
(optional) minimum probability for yes or no |
Outputs
| Output | Type | Description |
|---|---|---|
state |
any |
graph state |
yes |
bool |
active when the answer is yes |
no |
bool |
active when the answer is no |
uncertain |
bool |
active when neither reaches the threshold or there is no answer |
p_true |
float |
probability of yes, or None without an answer |
failure_code |
str |
why there is no answer, or None |
Properties
| Property | Type | Default | Description |
|---|---|---|---|
label |
str |
"Node graph question" |
Name of the request in the Decision Log |
instructions |
text |
"" |
The question |
true_criteria |
text |
"" |
When the answer is yes |
false_criteria |
text |
"" |
When the answer is no |
threshold |
number |
0.9 |
Minimum probability for yes or no. Range: 0.5 – 1.0. |
Decision Model Status
decisions/DecisionModelStatus
Whether the decision model can answer questions now. Use it to skip building an expensive state when no answer can come.
Outputs
| Output | Type | Description |
|---|---|---|
ready |
bool |
True when the decision model is on and its setup is complete |
enabled |
bool |
True when the decision model is on |
status |
str |
disabled, incomplete or ready |
provider |
str |
the provider name, or None |
model |
str |
the model id |