Noul – yes/no decisions
The Noul node asks Laya a question that can be answered with yes or no, for example “Does the customer ask for a refund?” or “Is this message phishing?”. Laya returns the probability of “yes”. The node turns this number into a simple route that you can branch on with a Switch node.
At a glance
- Question type: yes or no
- Laya returns:
noul– probability of “yes” from 0 to 1 - The node adds:
route= yes no unsure - Batch mode: supported
When to use Noul
- A clear yes/no decision: refund requested, cancellation, complaint, phishing, reply expected, contains an invoice number …
- A safety zone: answers where Laya is not sure enough go to a human instead of being guessed.
- Several independent checks (“refund?”, “complaint?”, “cancellation?”): one Noul node per question, or all of them in one request with the Advanced node.
Is the answer one of several different things (department, topic)? Use Choice instead.
How the decision works
Laya returns noul, the probability that the answer is “yes”. Two limits split the range from 0 to 1 into three parts:
0 0.15 0.85 1|── no ─────|──────── unsure ────────────|──── yes ───|
noul value | route |
|---|---|
| from 0 up to and including No Up To (default 0.15) | no |
| between No Up To and Yes From | unsure or what you choose in If Unsure |
| from Yes From (default 0.85) up to 1 | yes |
Examples with the defaults: 0.93 → yes · 0.04 → no · 0.60 → unsure · 0.30 → unsure.
Tip: The limits do not have to be symmetric. For a phishing check you might prefer “in doubt, yes”: Yes From 0.6 and No Up To 0.1.
Settings
📷 Image placeholder: Screenshot of the Noul settings panel (Input, Output and Options sections).
Input
| Field | Default | Description |
|---|---|---|
| Text | msg.text | The text or object Laya checks, for example msg.email with subject and body. In batch mode a list or an object of records. |
| Question | Does the customer ask for a refund? | The yes/no question. Keep it short and avoid negations. Can come from Custom, Message or JS, so one flow can ask different questions. |
Output
| Field | Default | Description |
|---|---|---|
| Result | msg.laya | Laya’s answer plus route. See Result. |
Options
| Option | Default | Description |
|---|---|---|
| Batch | off | On: Text holds many records (list or object with IDs). Every record gets the question. See Batch mode. |
| Yes From | 0.85 | From this noul value on, route is yes. Both 0.85 and 0,85 are accepted. |
| No Up To | 0.15 | Up to this noul value, route is no. Must be lower than Yes From. |
| If Unsure | unsure | What route becomes between the two limits: unsure, yes (treat as yes) or no (treat as no). noul always keeps Laya’s real value. |
The limits are numbers from 0 to 1. Write 0.85, not 85.
Connection options: Model, Server URL, API Key, Timeout
| Option | Default | Description |
|---|---|---|
| Model | Auto | Laya model. Auto picks by language. |
| Server URL | http://127.0.0.1:8000 | Address of the Laya server. |
| API Key (optional) | empty | Vault item with the key, only if the server uses LAYA_API_KEY. |
| Timeout (sec) | 30 | Maximum wait for Laya. |
These options are the same for all Laya nodes. Details in the overview.
Result
Result contains Laya’s answer unchanged, plus route. Example for “You charged my invoice twice, I want my money back!”:
{ "type": "noul", "noul": 0.9815, "confidence": 0.9815, "answer_confidence": 0.9815, "action": { "act_probability": 1.0 }, "model": "laya-rl-agent", "usage": { "input_tokens": 226, "state_tokens": 40, "truncated": false, "...": "…" }, "routing": { "model": "multilingual", "detection": { "language": "en", "...": "…" } }, "route": "yes"}
| Field | Meaning |
|---|---|
route | yes, no or unsure, calculated from noul and your limits. The only field added by the node. |
noul | Probability of “yes” from 0 to 1. |
answer_confidence | How sure Laya is about its answer: the larger of noul and 1 − noul. 0.98 “yes” and 0.02 “yes” (= 0.98 “no”) are both very sure. |
usage.truncated | true if the text was too long and its end was not read. |
routing.model | The model that answered. |
Branching with a Switch node
Noul has one output. Connect a Switch node behind it and add one condition per route:
msg.laya.route == "yes"msg.laya.route == "no"msg.laya.route == "unsure"
📷 Image placeholder: Screenshot of a flow Noul → Switch with three branches (yes / no / unsure), e.g. “refund process”, “normal answer”, “human review”.
You can also use the raw value, for example for an extra strict path:
msg.laya.noul >= 0.95
Batch mode
With Batch on, every record in Text gets the question in one request (up to 64 records per request; more are split automatically).
Input
msg.text = { "T1": "You charged me twice, please refund.", "T2": "Great service, thank you!", "T3": "When is your office open?"};
Result
{ "T1": { "type": "noul", "noul": 0.91, "route": "yes", "...": "…" }, "T2": { "type": "noul", "noul": 0.03, "route": "no", "...": "…" }, "T3": { "type": "noul", "noul": 0.12, "route": "no", "...": "…" }}
With a list as input (["…", "…"]) the result is a list in the same order. Each entry has exactly the same fields as without batch mode, including route.
Examples
Refund requests to accounting
- Text:
msg.email(object withsubjectandbody) - Question: “Does the customer ask for a refund?”
- Switch: yes → create a task for accounting · unsure → human review · no → continue normally
Phishing check: in doubt, block
- Question: “Is this message phishing or a scam?”
- Yes From
0.6· No Up To0.1· If Unsure: yes (treat as yes) - Everything that is not clearly harmless is treated as suspicious.
Question from a variable
Set Question to Message scope and fill msg.question earlier in the flow. One Noul node can then serve several rules from a table.
Tips
- Find your limits with real data. Run 50–100 typical texts, look at
noulfor the wrong answers and set the limits so that they fall intounsure. - Ask positively. “Does the customer want to cancel?” is more reliable than a question with “not”.
- Several yes/no questions about the same text? Use the Advanced node: all questions run in one request.
Errors
| Message | Cause and fix |
|---|---|
Please enter a question | Question is empty, or the variable it points to is empty. |
Yes From is not a number: …No Up To is not a number: … | Enter a number from 0 to 1, for example 0.85. |
… must be between 0 and 1 (e.g. 0.85 for 85 %) | Percent values like 85 are not accepted. Use 0.85. |
Invalid limits: No Up To must be lower than Yes From | Swap or correct the two limits. |
Laya returned no yes/no answer | Unexpected answer from the server. Check the Laya server version and log. |
Connection, timeout, API key and batch errors are the same for all nodes. See Laya package – overview and setup.