Skip to content

Interface: ConversationMessageResponse

@kortexya/reasoninglayer


@kortexya/reasoninglayer / Conversation / ConversationMessageResponse

Interface: ConversationMessageResponse

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

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

The assistant’s natural language response.


claimAnnotations?

optional claimAnnotations: ClaimAnnotationDto[] | null

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

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


cognitiveStrategy?

optional cognitiveStrategy: CognitiveStrategyDto | null

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

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

The conversation ID (existing or newly created).


intent

intent: string

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

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


modelId?

optional modelId: string | null

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

The model id (compare registry) that produced this turn, when a per-request model was set — so a UI can label which model a side-by-side column came from.


originalOsfql?

optional originalOsfql: string | null

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

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

OSFQL that was executed (if any).


prefillMs?

optional prefillMs: number | null

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

Prompt-prefill wall-clock (ms) for the NL→OSFQL generation — the one-time cost before decoding begins.

Remarks

Surfaced beside tokensPerSec (which is decode-only on the device path) so a short query’s prefill is visible instead of crushing the apparent rate. Absent unless measured.


producedTermIds

producedTermIds: string[]

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

IDs of terms produced by the OSFQL execution.


proofTrace?

optional proofTrace: ProofTraceNodeDto | null

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

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

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

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

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

Contextual OSFQL suggestions for follow-up queries.


tokensPerSec?

optional tokensPerSec: number | null

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

Decode throughput for the NL→OSFQL generation, in tokens/second (wall-clock of the LLM call ÷ generated tokens). Approximate; surfaced for model comparison.


uiCustomizations?

optional uiCustomizations: UICustomizationDto[] | null

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

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


uiSortId?

optional uiSortId: string | null

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

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


validityCertificateHash?

optional validityCertificateHash: string | null

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

SHA-256 hash of the validity certificate.


validityCertificateId?

optional validityCertificateId: string | null

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

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


validityCertificateRuleProgramHash?

optional validityCertificateRuleProgramHash: string | null

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

Hex SHA-256 of the rule program active when the validity certificate was issued — the durable “which rule version served this proof” pin.


validityCertificateRuleRevision?

optional validityCertificateRuleRevision: number | null

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

In-process rule-program revision ordinal at issuance. Present only when rule-revision tracking is enabled on the executing store.