Interface: ScenarioRule
@kortexya/reasoninglayer / ScenarioRule
Interface: ScenarioRule
Section titled “Interface: ScenarioRule”Defined in: src/types/scenarios.ts:283
An inference rule of a GeneratedScenario (rules) or of
UpdateScenarioRequest.addRules.
Remarks
Section titled “Remarks”Authored through the rule door of POST /api/v1/inference/rules, with its
feature encoding and every check it runs. A rule the door refuses is not
written and is named in the response’s warnings: a conclusion variable no
antecedent binds, no antecedent, a new cycle through negation, or a feature
value the door cannot read.
Example
Section titled “Example”const rule: ScenarioRule = { head: { sort: 'vegetarian_pizza', features: { topping: '?T' } }, antecedents: [ { sort: 'pizza', features: { topping: '?T' } }, { sort: 'meat_topping', negated: true, binding: '?T' }, ], certainty: 0.9,};Properties
Section titled “Properties”antecedents?
Section titled “antecedents?”
optionalantecedents?:ScenarioRuleTerm[]
Defined in: src/types/scenarios.ts:287
The conditions. Defaults to empty.
certainty?
Section titled “certainty?”
optionalcertainty?:number
Defined in: src/types/scenarios.ts:289
Certainty of the rule, 0.0 to 1.0. Defaults to 0.8.
head:
ScenarioRuleTerm
Defined in: src/types/scenarios.ts:285
The conclusion.