Skip to content

Interface: NlQueryResponse

@kortexya/reasoninglayer


@kortexya/reasoninglayer / NlQueryResponse

Defined in: src/types/query.ts:534

Response from a natural language query.

optional agentId?: string | null

Defined in: src/types/query.ts:553

Session id for continuity: the cognitive-mode agent, or the TRIZ session (pass it back as sessionId).


optional answer?: ConversationMessageResponse

Defined in: src/types/query.ts:579

The turn the conversation pipeline answered (llm and cognitive modes): the verified claims, the stripped claims and why, or the abstention, as conversation.sendMessage returns them. explanation and cognitiveSummary repeat its sealed prose.


optional cognitiveSummary?: string | null

Defined in: src/types/query.ts:555

Cognitive cycle summary (NL response from Psi-term results).


optional component?: string

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

The /health component a model refusal needed (text_model, …), beside the refusal’s code; absent otherwise.


optional derivationComplete?: boolean

Defined in: src/types/query.ts:572

Whether the backward-chaining search behind results ran to completion. false means it stopped at a bound and results is a floor, not the whole answer. Absent when no derivation produced the results.


optional error?: string | null

Defined in: src/types/query.ts:548

Error message if failed.


optional explanation?: string | null

Defined in: src/types/query.ts:544

Explanation from LLM/model.


optional gateCode?: string

Defined in: src/types/query.ts:585

The engine’s code when it answered nothing on purpose, for example sort_not_declared: the question names a kind of record the Space does not declare.


optional generatedOsf?: string | null

Defined in: src/types/query.ts:546

The OSFQL that was executed (llm and cognitive modes).


mode: NlQueryMode

Defined in: src/types/query.ts:540

Mode used for translation.


optional noveltyScores?: TrizNoveltyScore[]

Defined in: src/types/query.ts:566

Novelty of the inventive proposals (TRIZ mode), one entry per triz_inventive_proposal item of results, in the same order.


query: string

Defined in: src/types/query.ts:538

Original query.


results: NlQueryResultItem[]

Defined in: src/types/query.ts:542

Results from query execution.


optional structuredProblem?: TrizStructuredProblem

Defined in: src/types/query.ts:561

The structured contradiction (TRIZ mode), for the user to confirm.


success: boolean

Defined in: src/types/query.ts:536

Whether the query was successful.


optional toolCall?: ToolCallInfo | null

Defined in: src/types/query.ts:557

Tool call info (constraint mode).


optional trizSessionStatus?: TrizSessionStatus

Defined in: src/types/query.ts:559

TRIZ session status (TRIZ mode).