# Noul

A yes/no statement. The answer is the probability that the answer is yes, with a `confidence` that is the larger of it and 1 minus it.

## Request

```json
{"state": "I have asked three times now. Can I please just talk to a real person?",
 "questions": {"wants_human": {"type": "noul", "instructions": "Is the customer asking for a human agent?"},
               "repeat_contact": {"type": "noul", "instructions": "Has the customer contacted support about this before?",
                                  "criteria": {"true": "Mentions a prior attempt, ticket, or having asked before",
                                               "false": "No sign of any previous contact"}}}}
```

`criteria` is optional and describes what true and false mean when the boundary is subtle.

## Answer

```json
{
 "wants_human": {
  "type": "noul",
  "noul": 1.0,
  "confidence": 1.0
 },
 "repeat_contact": {
  "type": "noul",
  "noul": 0.549,
  "confidence": 0.549
 }
}
```

## Thresholds

The number is both the answer and its certainty. Set the threshold by the cost of each error:

```python
YES, NO = 0.8, 0.2
if NO < value < YES:
    send_to_human_review()
elif value >= YES:
    take_yes_action()
else:
    take_no_action()
```

## Guidance

- One condition per Noul; "angry and asking for a refund" is two questions.
- Phrase for yes, in plain words; inverted phrasings ("is it not the case that") read worse.
- A Noul measures probability, not magnitude: for "how much" use Score.
- A stray answer near the threshold happens. If an action is expensive, check the condition in code (a memory rule with `when`, or `derive`) or count the answers, as the roulette demo does.
