Interface: RuleAggregatorDto
@kortexya/reasoninglayer / RuleAggregatorDto
Interface: RuleAggregatorDto
Section titled “Interface: RuleAggregatorDto”Defined in: src/types/inference.ts:733
Rule aggregator descriptor for engine-side aggregation on rule heads.
Remarks
Section titled “Remarks”When declared on a rule, the engine aggregates multiple proofs of that rule which
share the same groupBy feature values, applying op to the
target feature. This eliminates run-to-run variance from proof-order
sensitivity and makes maxSolutions cap unique groups, not raw proofs.
Wire format is snake_case (group_by).
Example
Section titled “Example”const aggregator: RuleAggregatorDto = { groupBy: ['customer_id'], op: 'sum', target: 'amount',};Properties
Section titled “Properties”groupBy
Section titled “groupBy”groupBy:
string[]
Defined in: src/types/inference.ts:738
Feature names that define the aggregation group key. Proofs with identical values
for all groupBy features are merged.
op:
string
Defined in: src/types/inference.ts:740
Aggregation operator: "sum", "max", "min", "count", or "first".
target
Section titled “target”target:
string
Defined in: src/types/inference.ts:742
Feature name whose value is aggregated within each group.