Interface: LtnQueryResponse
@kortexya/reasoninglayer / LtnQueryResponse
Interface: LtnQueryResponse
Section titled “Interface: LtnQueryResponse”Defined in: src/types/ltn.ts:203
The tagged-union query result. The populated fields depend on kind.
Remarks
Section titled “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
Section titled “Example”if (response.residuated) { console.log('suspended on:', response.residuationTriggers);} else { console.log('truth degree:', response.grounded);}Properties
Section titled “Properties”certainties?
Section titled “certainties?”
optionalcertainties?:number[] |null
Defined in: src/types/ltn.ts:207
The per-rule learned certainties (value).
generalisation?
Section titled “generalisation?”
optionalgeneralisation?:number[] |null
Defined in: src/types/ltn.ts:209
Per-instance truth degrees, in request order (generalisation).
grounded?
Section titled “grounded?”
optionalgrounded?:number|null
Defined in: src/types/ltn.ts:211
The grounded truth degree (ground, when not residuated).
kind:
string
Defined in: src/types/ltn.ts:205
Echoes the request kind.
residuated?
Section titled “residuated?”
optionalresiduated?:boolean|null
Defined in: src/types/ltn.ts:216
true when the neural grounding residuated (suspended) instead of producing
a value (ground).
residuationTriggers?
Section titled “residuationTriggers?”
optionalresiduationTriggers?: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?
Section titled “truth?”
optionaltruth?:number|null
Defined in: src/types/ltn.ts:223
The formula’s truth degree (truth).