Skip to content

Interface: LtnQueryResponse

@kortexya/reasoninglayer


@kortexya/reasoninglayer / LTN / LtnQueryResponse

Interface: LtnQueryResponse

Defined in: src/types/ltn.ts:203

The tagged-union query result. The populated fields depend on kind.

Remarks

kind echoes the request and is one of "ground", "truth", "value", "generalisation". It is typed as string because the backend does not publish it as a closed enum.

A ground query can residuate rather than produce a value — OSF/LIFE’s “suspend, do not fail”. When residuated is true, grounded is absent and residuationTriggers says what the grounding is waiting on.

Example

if (response.residuated) {
console.log('suspended on:', response.residuationTriggers);
} else {
console.log('truth degree:', response.grounded);
}

Properties

certainties?

optional certainties: number[] | null

Defined in: src/types/ltn.ts:207

The per-rule learned certainties (value).


generalisation?

optional generalisation: number[] | null

Defined in: src/types/ltn.ts:209

Per-instance truth degrees, in request order (generalisation).


grounded?

optional grounded: number | null

Defined in: src/types/ltn.ts:211

The grounded truth degree (ground, when not residuated).


kind

kind: string

Defined in: src/types/ltn.ts:205

Echoes the request kind.


residuated?

optional residuated: boolean | null

Defined in: src/types/ltn.ts:216

true when the neural grounding residuated (suspended) instead of producing a value (ground).


residuationTriggers?

optional residuationTriggers: string[] | null

Defined in: src/types/ltn.ts:221

Human-readable residuation triggers (ground, when residuated): what the grounding is waiting on (an unembedded individual, an unregistered predicate).


truth?

optional truth: number | null

Defined in: src/types/ltn.ts:223

The formula’s truth degree (truth).