Ask a binary question and receive the probability that its answer is yes.
Use Noul when the probability itself is useful to application code, such as
deciding whether a message reports a bug or requests a refund. A value near
1 indicates strong support for yes, near 0 strong support for no, and
near 0.5 uncertainty. Noul answers have no separate confidence.
Write the complete judgment in instructions, even when the question ID
seems self-explanatory. Optional criteria define the yes and no outcomes.
Noul: z.infer<typeof noulSchema>const response = await model.invoke({
state: "Production is down. Please help immediately.",
questions: {
urgent: {
type: "noul",
instructions: "Does this message require an urgent response?",
},
},
});
if (response.nouls.urgent.noul >= 0.8) pageOnCallEngineer();