Skip to content

Interface: ScenarioRule

@kortexya/reasoninglayer


@kortexya/reasoninglayer / ScenarioRule

Defined in: src/types/scenarios.ts:283

An inference rule of a GeneratedScenario (rules) or of UpdateScenarioRequest.addRules.

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.

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,
};

optional antecedents?: ScenarioRuleTerm[]

Defined in: src/types/scenarios.ts:287

The conditions. Defaults to empty.


optional certainty?: 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.