Skip to content

Interface: ConversationTrainingConfigDto

@kortexya/reasoninglayer


@kortexya/reasoninglayer / ConversationTrainingConfigDto

Defined in: src/types/rl-training.ts:45

Configuration for training on conversation data.

Used when RlTrainRequest.environmentName starts with "conversation". Controls how conversation transcripts are sourced (real or synthetic) and how each turn is rewarded.

With useRealConversations, a run trains on two sources together: the cognitive agent’s recorded conversations and the tenant’s chat conversations. conversationIds, agentId and numTranscripts select from each source. The run falls back to synthetic transcripts only when neither source has a conversation; RlTrainResponse.transcripts reports where they came from.

Serialized to the snake_case wire shape (num_transcripts, reward_step_cost, …). The engine refuses an unknown key, and refuses null for a field it defaults: leave a field out to take its default.

const config: ConversationTrainingConfigDto = {
numTranscripts: 25,
maxTurns: 12,
useRealConversations: true,
rewardUserFeedback: 0.8,
};

optional agentId?: string | null

Defined in: src/types/rl-training.ts:50

Keep only the conversations of this agent (UUID), in each source. Applies with useRealConversations.


optional conversationIds?: string[]

Defined in: src/types/rl-training.ts:55

Keep only these conversations (UUIDs), in each source. When empty and useRealConversations is true, the most recent conversations are used.


optional maxTurns?: number

Defined in: src/types/rl-training.ts:57

Maximum turns per episode (default: 20).


optional numTranscripts?: number

Defined in: src/types/rl-training.ts:63

With useRealConversations, the most conversations taken from EACH source, most recent first. Without it, or when neither source has a conversation, the number of synthetic transcripts generated (default: 10).


optional rewardGoalCompletion?: number

Defined in: src/types/rl-training.ts:65

Reward for goal completion (default: 1.0).


optional rewardStepCost?: number

Defined in: src/types/rl-training.ts:67

Step cost penalty (default: -0.01).


optional rewardSuccessfulProof?: number

Defined in: src/types/rl-training.ts:69

Reward for a successful proof (default: 0.3).


optional rewardUserFeedback?: number

Defined in: src/types/rl-training.ts:76

Reward scale for a user-rated chat answer (default: 0.5). An answer rated helpful earns rewardUserFeedback × satisfaction; one rated unhelpful takes the failed-goal penalty instead. Ratings come from conversation.submitAnswerFeedback.


optional topics?: string[]

Defined in: src/types/rl-training.ts:78

Conversation topics for synthetic transcript generation.


optional useRealConversations?: boolean

Defined in: src/types/rl-training.ts:85

When true, trains on real conversations instead of synthetic transcripts: the cognitive agent’s recorded conversations and the tenant’s chat conversations together, the most recent numTranscripts of each. Synthetic transcripts are only the fallback when neither source has one.