decide
Choose between multiple plausible actions by returning calibrated probabilities for each option plus an act or escalate gate, so agents can resolve ambiguity or defer to a human.
Instructions
Choose between several courses of action and get a gated decision. Use when the task is ambiguous: more than one option is plausible, or none clearly is. Returns probabilities over every option plus 'act' or 'escalate' — escalate means it is too close to call and a human or a stronger model should decide. Cheap: a local call costs nothing and no state leaves this machine.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| state | Yes | The situation to decide on: a string, or an object of named facts. | |
| act_at | No | Probability the winner needs before acting. Default 0.65. Raise to make the agent ask more; lower to make it act more. | |
| margin | No | Lead over the runner-up needed before acting. Default 0.15. This is what stops a 55/45 split being treated as a decision. | |
| backend | No | Force an engine. Omit to use the default. An engine that cannot run is an error, never a silent substitute. | |
| options | Yes | The candidate actions. Give a description whenever the label alone could be read two ways. | |
| instruction | Yes | What is being decided, phrased as a question about the state. | |
| state_label | No | Key to file a plain-string state under, when the questions refer to it by name. Default 'state'. |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| model | No | ||
| margin | No | lead over the runner-up | |
| reason | Yes | why the gate decided that way | |
| backend | Yes | ||
| decision | Yes | act when the winner cleared the gate; escalate when it did not | |
| runner_up | No | ||
| confidence | No | probability on the recommendation | |
| probabilities | Yes | label -> probability, every option the caller offered | |
| recommendation | No | the leading option |