Skip to content

Interface: NlQueryRequest

@kortexya/reasoninglayer


@kortexya/reasoninglayer / NlQueryRequest

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

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:460

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


optional conversationHistory?: ConversationTurnDto[] | null

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

Optional conversation history for context (llm mode only).


optional excludeDomains?: string[] | null

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

TRIZ refinement: domain names to exclude from the results.


optional focusProposal?: number | null

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

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


optional focusSorts?: string[] | null

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

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 images?: ImageInput[] | null

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

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


optional mode?: NlQueryMode

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

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


query: string

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

The natural language question.


optional sessionId?: string | null

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

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:438

Tenant ID for the query.