noul question asks something that is either true or false about the state: is this ticket urgent, is this clause exclusive, is this message spam. Instead of a word, you get back the probability that the answer is yes. This page is for developers who gate an action on a yes/no judgement and need to decide where to draw the line.
The shape
A
noul always has exactly two answers, named yes and no. You do not name them yourself, and they are the names other questions use in ask_if to depend on this one. Unknown keys inside a question are refused with 400 invalid_body.
Use criteria when the question alone leaves room for doubt. “Urgent” means different things to different teams; spelling out both sides tells the model where your boundary is.
Ask it
This run asks onenoul question about a support ticket.
Read the answer
In the ticket-triage run from the decision runs guide, theurgent question came back as:
So this ticket is urgent with probability 0.83. A
noul answer has no confidence field and no choice field: probability is the whole answer. If you need a word, derive it yourself, and see the next section before you reach for 0.5.
Turn the probability into an action
A probability is only useful once you compare it with a threshold, and the right threshold depends on what each kind of mistake costs you, not on the model.- A false yes is acting when you should not have: paging someone at night, blocking a legitimate payment.
- A false no is not acting when you should have: a churn threat that waits a day, a fraud that goes through.
instructions or the criteria: the wording moves the probabilities.
When to distrust the number
answered_within_labels: false: the model’s most likely token was neitheryesnorno. The probability is a renormalisation over two labels the model did not favour. Send the item to a person, whatever the probability says.- A low
label_mass: most of the probability went elsewhere. Rephrase the question so that yes or no is a natural reply. - Values that cluster around your threshold: try
drawsfrom 2 to 8. With more than one draw, the run’scost_basisisestimated.
Write good noul questions
- Ask one thing. “Is this urgent and about billing?” is two questions; split it into a
nouland a choice. - Make yes the actionable case, so a high probability always means “do something”.
- Put the definition in
criteria, not in a longerinstructionsstring. Keepinstructionsshort. - When the answer has more than two outcomes, or an order, use a choice or a score question instead of several
noulquestions.
What goes wrong
Related
- Decision questions - how noul, choice and score questions fit together.
- Decision runs - every request field, the full response and the costs.
- Conditional questions - ask a question only when a noul came back yes.
- Playground - try a noul question in the console with
+ noul. - invalid_decision_questions - every reason a question set is refused.