Skip to content

Interface: NlQueryRequest

@kortexya/reasoninglayer


@kortexya/reasoninglayer / NlQueryRequest

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

Request for a natural language query.

TRIZ mode (mode: "triz") is multi-turn. A request with no sessionId opens a session (optionally with images) and names it in the response’s agentId. A later request with that sessionId either reads the stored session (no other TRIZ field set; no LLM call), confirms it (confirmSession: true), or refines it (focusProposal and/or excludeDomains). Sessions belong to the tenant that opened them.

optional confirmSession?: boolean | null

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

TRIZ: confirm the session’s structured problem and run the invention pipeline.


optional conversationHistory?: ConversationTurnDto[] | null

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

Optional conversation history for context (llm mode only).


optional excludeDomains?: string[] | null

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

TRIZ refinement: domain names to exclude from the results.


optional focusProposal?: number | null

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

TRIZ refinement: focus on one proposal, by its 0-based index.


optional focusSorts?: string[] | null

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

Sort names the question is about (llm mode). Each named sort is always in the schema shown to the translator, with every feature it declares, ahead of the record-count ranking that fills the rest of the prompt budget — so a freshly built sort with no records yet is not cut from the context of a question about it. A name that matches no sort of the tenant is ignored.


optional fresh?: boolean

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

Ask ReasoningLayer to bypass its NL translation cache for this request.


optional images?: ImageInput[] | null

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

Images for a new TRIZ session. Allowed only with mode: "triz" and no sessionId.


optional mode?: NlQueryMode

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

Translation mode: “llm” (default), “constraint”, “cognitive”, “triz” or “grounded_sql”.


query: string

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

The natural language question.


optional sessionId?: string | null

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

Session to continue: the cognitive-mode agent session, or the TRIZ session named by an earlier response’s agentId.


tenantId: string

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

Tenant ID for the query.