Skip to content

Interface: SolutionDto

@kortexya/reasoninglayer


@kortexya/reasoninglayer / SolutionDto

Defined in: src/types/inference.ts:293

A solution from backward chaining.

Contains variable bindings, an optional proof tree, certainty score, and open-world inference metadata.

certainty: number

Defined in: src/types/inference.ts:305

Certainty score (0.0 to 1.0).


optional conclusion?: ProofConclusionDto

Defined in: src/types/inference.ts:303

The conclusion this solution established, as a structured term: the proof root’s ProofDto.conclusion. Present also when the conclusion was never stored. Absent only when the solution names no term.


optional evidenceMatched?: number | null

Defined in: src/types/inference.ts:307

Number of matched antecedents (open-world only).


optional evidenceRatio?: number | null

Defined in: src/types/inference.ts:309

Evidence ratio for open-world inference (matched/total antecedents). Null in closed-world mode.


optional evidenceSupport?: number | null

Defined in: src/types/inference.ts:322

Deep evidential support in [0, 1] (open-world only): the fraction of ground-fact leaves the proof rests on that are actually witnessed by facts, computed recursively over the proof tree.

Unlike evidenceRatio (shallow, top-level), this sees through chained derivations, so residuation inside a derived sub-goal is reflected. It is the epistemic ranking axis, orthogonal to certainty (the residuation-faithful degree): rank candidate solutions by this to prefer the ones actually grounded in evidence.


optional matchedSorts?: string[]

Defined in: src/types/inference.ts:333

Sort names of the matched (witnessed or derived) antecedents. Open-world only.

The named counterpart of evidenceMatched, so a sealed differential can be re-verified from the response alone. The engine omits the key when the list is empty.


optional proof?: ProofDto | null

Defined in: src/types/inference.ts:297

Proof tree showing how the solution was derived. Null if proof generation was disabled.


optional residuatedSorts?: string[]

Defined in: src/types/inference.ts:324

Sort names that were residuated (suspended due to missing information). Open-world only.


optional scoreDecomposition?: LogOddsScoreDecompositionDto

Defined in: src/types/inference.ts:343

How certainty was arrived at, term by term.

Present when the solution was scored by the log-odds model. It is the audit trail for a ranking: which antecedents were credited, which facts witnessed them, and what each contributed — so a caller can say WHY one solution outranked another rather than only that it did.


substitution: HomoiconicSubstitutionDto

Defined in: src/types/inference.ts:295

Variable substitution (bindings from variables to values).