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 valueroute
from 0 up to and including No Up To (default 0.15)no
between No Up To and Yes Fromunsure or what you choose in If Unsure
from Yes From (default 0.85) up to 1yes

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

FieldDefaultDescription
Textmsg.textThe text or object Laya checks, for example msg.email with subject and body. In batch mode a list or an object of records.
QuestionDoes 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

FieldDefaultDescription
Resultmsg.layaLaya’s answer plus route. See Result.

Options

OptionDefaultDescription
BatchoffOn: Text holds many records (list or object with IDs). Every record gets the question. See Batch mode.
Yes From0.85From this noul value on, route is yes. Both 0.85 and 0,85 are accepted.
No Up To0.15Up to this noul value, route is no. Must be lower than Yes From.
If UnsureunsureWhat 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
OptionDefaultDescription
ModelAutoLaya model. Auto picks by language.
Server URLhttp://127.0.0.1:8000Address of the Laya server.
API Key (optional)emptyVault item with the key, only if the server uses LAYA_API_KEY.
Timeout (sec)30Maximum 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"
}
FieldMeaning
routeyes, no or unsure, calculated from noul and your limits. The only field added by the node.
noulProbability of “yes” from 0 to 1.
answer_confidenceHow 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.truncatedtrue if the text was too long and its end was not read.
routing.modelThe 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

  1. Text: msg.email (object with subject and body)
  2. Question: “Does the customer ask for a refund?”
  3. Switch: yes → create a task for accounting · unsure → human review · no → continue normally

Phishing check: in doubt, block

  1. Question: “Is this message phishing or a scam?”
  2. Yes From 0.6 · No Up To 0.1 · If Unsure: yes (treat as yes)
  3. 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 noul for the wrong answers and set the limits so that they fall into unsure.
  • 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

MessageCause and fix
Please enter a questionQuestion 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 FromSwap or correct the two limits.
Laya returned no yes/no answerUnexpected 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.


Was this article helpful?
© 2026 Robomotion Help by aeovi.com