Skip to content

Interface: BackwardChainRequest

@kortexya/reasoninglayer


@kortexya/reasoninglayer / BackwardChainRequest

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

Request for backward chaining inference.

Dual input mode: Provide EITHER goal (inline goal) OR goal_id (reference to a saved goal), but not both.

Serialization format: Request uses untagged TermInputDto / FeatureInputValueDto. Response uses PsiTermDto / SolutionDto.

optional constraints?: ConstraintInputDto[]

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

Additional constraints (deprecated — prefer ConstrainedVariable in goal).


optional explainFailure?: boolean

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

When the goal has no solution, explain why not: the nearest fact of the goal’s sort and the stated values it disagrees on, and for each rule that could conclude the goal, the premises that have no proof. Closed-world only. Default false.


optional goal?: TermInputDto | null

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

Inline goal as a TermInputDto. Mutually exclusive with goal_id.


optional goalId?: string | null

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

Reference to a saved goal by UUID. Mutually exclusive with goal.


optional maxDepth?: number

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

Maximum proof depth to prevent infinite recursion. Default: 100.


optional maxSolutions?: number

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

Maximum number of solutions.


optional minCertainty?: number

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

Minimum certainty threshold.


optional openWorld?: boolean

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

Whether to use open-world reasoning (evidence-based instead of closed-world).


optional saveGoal?: boolean

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

Whether to persist the goal for later reuse.


optional timeoutMs?: number | null

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

Wall-clock timeout in milliseconds (default: 30000). Returns partial results on timeout.