Interface: RuleAggregatorDto
@kortexya/reasoninglayer / Inference / RuleAggregatorDto
Interface: RuleAggregatorDto
Defined in: src/types/inference.ts:291
Rule aggregator descriptor for engine-side aggregation on rule heads.
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
const aggregator: RuleAggregatorDto = { groupBy: ['customer_id'], op: 'sum', target: 'amount',};Properties
groupBy
groupBy:
string[]
Defined in: src/types/inference.ts:296
Feature names that define the aggregation group key. Proofs with identical values
for all groupBy features are merged.
op
op:
string
Defined in: src/types/inference.ts:298
Aggregation operator: "sum", "max", "min", "count", or "first".
target
target:
string
Defined in: src/types/inference.ts:300
Feature name whose value is aggregated within each group.