Skip to content

Interface: RewardScoreRequest

@kortexya/reasoninglayer


@kortexya/reasoninglayer / Reward / RewardScoreRequest

Interface: RewardScoreRequest

Defined in: src/types/reward.ts:14

Body of POST /api/v1/reward/score — score a candidate query.

Properties

constraints?

optional constraints: [string, string][]

Defined in: src/types/reward.ts:19

Feature → value constraints, as an array of [feature, value] pairs (e.g. [["maker","Tesla"]]). Optional.


maxInstances?

optional maxInstances: number | null

Defined in: src/types/reward.ts:24

Bounded sample size used the first time this tenant’s model is mined. Optional.


negativeIds?

optional negativeIds: string[]

Defined in: src/types/reward.ts:29

Optional explicit negatives for precision-by-example; mined from the positives when empty.


objective?

optional objective: RewardObjective | null

Defined in: src/types/reward.ts:31

"recall" (default — the non-emptiness certificate) or "precision".


positiveIds?

optional positiveIds: string[]

Defined in: src/types/reward.ts:37

Precision by EXAMPLE: explicit positive instance ids. When non-empty (with objective: "precision") the concept is these instances, overriding targetSort.


sort

sort: string

Defined in: src/types/reward.ts:39

The query’s sort, by lattice name (e.g. "Article", "vehicle").


targetSort?

optional targetSort: string | null

Defined in: src/types/reward.ts:45

For the precision objective: the concept to discriminate, by lattice name. Its instances are the positives; near-miss siblings are mined as negatives.