(apply-rules answers rules)The pure half of gate: rules over answers ask returned. No rule fired ->
action "" (not escalated).
The pure half of `gate`: rules over answers `ask` returned. No rule fired -> action "" (not escalated).
(ask c st qs)(ask c st qs bands)Answers by name. A noul answer carries :band (yes | no | uncertain); a
choice or score answer carries :sure. bands merges over the default.
Answers by name. A noul answer carries `:band` (yes | no | uncertain); a choice or score answer carries `:sure`. `bands` merges over the default.
(band-answers decision bands)A decision's answers by name, read against bands (merged over the
default): noul answers gain :band, choice/score answers gain :sure. The
pure half of ask, public so a caller that also needs the decision's
:calibrated (the §8B batteries) reads answers by the same rule.
A decision's answers by name, read against `bands` (merged over the default): noul answers gain `:band`, choice/score answers gain `:sure`. The pure half of `ask`, public so a caller that also needs the decision's `:calibrated` (the §8B batteries) reads answers by the same rule.
(choice nm instructions options)A named choice question; options maps an option id to what picking it MEANS.
A named choice question; `options` maps an option id to what picking it MEANS.
(context ctx message)(context ctx message extra)Sugar: {context, message} plus any extra fields.
Sugar: `{context, message}` plus any `extra` fields.
(decide c st qs policy)Policy {:rules :default :bands :skip-uncertain}: the gate's rules, then the
declared fall-through. A non-empty :default is the no-rule-fired action; an
empty one escalates with reason "no rule fired".
Policy `{:rules :default :bands :skip-uncertain}`: the gate's rules, then the
declared fall-through. A non-empty `:default` is the no-rule-fired action; an
empty one escalates with reason "no rule fired".Cut-points, exclusive on the confident side: p < low -> no, p > high -> yes, else uncertain.
Cut-points, exclusive on the confident side: p < low -> no, p > high -> yes, else uncertain.
(gate c st qs rules)(gate c st qs rules bands)Rules {:question :below|:at-least|:is :action :target}, first match wins.
Returns {:action :target :escalated :request :answers}.
Rules `{:question :below|:at-least|:is :action :target}`, first match wins.
Returns `{:action :target :escalated :request :answers}`.(noul nm instructions)(noul nm instructions criteria)A named noul question. criteria, when given, is {"true" … "false" …}.
Instructions should NAME the state field they judge (ADR 0035 D9).
A named noul question. `criteria`, when given, is `{"true" … "false" …}`.
Instructions should NAME the state field they judge (ADR 0035 D9).(picked a)The picked option of a choice answer (nil otherwise).
The picked option of a choice answer (nil otherwise).
(recording t call-name live)A classifier that evaluates through live and records each decision under
call-name.
A classifier that evaluates through `live` and records each decision under `call-name`.
(replaying t call-name)A classifier that replays the decision recorded under call-name, with no
network. A miss throws naming the key and sends nothing.
A classifier that replays the decision recorded under `call-name`, with no network. A miss throws naming the key and sends nothing.
(score nm instructions levels)A named score question over an ORDERED vector of levels.
A named score question over an ORDERED vector of levels.
(state role data)State(role, data): the data's fields at the top level plus role. A value
that is not a map goes under data. The wire has no role field — the state
carries it (ADR 0035 D7); never copy the role into question instructions.
State(role, data): the data's fields at the top level plus `role`. A value that is not a map goes under `data`. The wire has no role field — the state carries it (ADR 0035 D7); never copy the role into question instructions.
(tape)(tape recorded)An empty tape: an atom of {call-name decision}.
An empty tape: an atom of `{call-name decision}`.
(value a)The one number of an answer: noul probability, score value, choice confidence.
The one number of an answer: noul probability, score value, choice confidence.
(wire-questions qs)The public question -> wire conversion: an ordered list of named questions
as the §8B {name -> question} map. A duplicate name throws naming it, before
any request.
The public question -> wire conversion: an ordered list of named questions
as the §8B `{name -> question}` map. A duplicate name throws naming it, before
any request.cljdoc builds & hosts documentation for Clojure/Script libraries
| Ctrl+k | Jump to recent docs |
| ← | Move to previous article |
| → | Move to next article |
| Ctrl+/ | Jump to the search field |