Skip to content

Interface: ConversationMessageResponse

@kortexya/reasoninglayer


@kortexya/reasoninglayer / Conversation / ConversationMessageResponse

Interface: ConversationMessageResponse

Defined in: src/types/conversation.ts:208

Response from processing a conversation message.

Remarks

Contains the assistant’s NL response, the OSFQL that was generated and executed, query results (for MATCH queries), and contextual suggestions for follow-up queries.

Properties

assistantMessage

assistantMessage: string

Defined in: src/types/conversation.ts:210

The assistant’s natural language response.


claimAnnotations?

optional claimAnnotations: ClaimAnnotationDto[] | null

Defined in: src/types/conversation.ts:247

Per-claim provenance annotations (if claims were annotated).


cognitiveStrategy?

optional cognitiveStrategy: CognitiveStrategyDto | null

Defined in: src/types/conversation.ts:259

Cognitive strategy used for this response (when RL training is active and a cognitive agent exists for the tenant). Absent on plain conversation turns.


conversationId

conversationId: string

Defined in: src/types/conversation.ts:213

The conversation ID (existing or newly created).


intent

intent: string

Defined in: src/types/conversation.ts:216

Classified intent type (e.g., “query”, “insert”, “define”).


originalOsfql?

optional originalOsfql: string | null

Defined in: src/types/conversation.ts:232

The original, rejected OSFQL the LLM first proposed — present only when repaired is true. Pairs with osfqlExecuted so the UI can show the original → executed diff.


osfqlExecuted?

optional osfqlExecuted: string | null

Defined in: src/types/conversation.ts:219

OSFQL that was executed (if any).


producedTermIds

producedTermIds: string[]

Defined in: src/types/conversation.ts:238

IDs of terms produced by the OSFQL execution.


proofTrace?

optional proofTrace: ProofTraceNodeDto | null

Defined in: src/types/conversation.ts:250

Proof tree for this response (populated when PROVE / backward chaining was used).


queryResults?

optional queryResults: Record<string, OsfqlValue>[] | null

Defined in: src/types/conversation.ts:235

Query results (if OSFQL was a MATCH). Each entry maps variable names to bound values.


reasoningTrace?

optional reasoningTrace: ReasoningTraceDto | null

Defined in: src/types/conversation.ts:267

LLM-as-sensor reasoning trace: the ordered pipeline stages (prepare_context → classify_intent → execute_osfql → generate_response), each tagged symbolic/sensor with matched entities and the OSFQL path. Powers the chat’s reasoning/audit explainability timeline.


repaired?

optional repaired: boolean

Defined in: src/types/conversation.ts:226

True when osfqlExecuted is a constrained-regeneration repair of a query the certify-or-abstain gate first rejected as hallucinated. Lets the UI surface that the answer reflects a corrected query rather than the user’s literal request.


suggestions

suggestions: string[]

Defined in: src/types/conversation.ts:244

Contextual OSFQL suggestions for follow-up queries.


uiCustomizations?

optional uiCustomizations: UICustomizationDto[] | null

Defined in: src/types/conversation.ts:253

UI customizations detected in this response (for multi-turn UI evolution).


uiSortId?

optional uiSortId: string | null

Defined in: src/types/conversation.ts:241

Sort ID referenced in the message (for UI rendering).


validityCertificateHash?

optional validityCertificateHash: string | null

Defined in: src/types/conversation.ts:270

SHA-256 hash of the validity certificate.


validityCertificateId?

optional validityCertificateId: string | null

Defined in: src/types/conversation.ts:273

ID of the validity certificate (if generate_certificate was true).