Skip to content

scoreTurn

function scoreTurn(
expect,
response,
toolsCalled,
transitions,
latencyMs,
extractionSnapshot?): object[];

Score a single turn against expectations.

Parameter Type Description

expect

| { extractionFields?: Record<string, unknown>; flowTransition?: { from: string; to: string; }; maxLatencyMs?: number; noToolCalls?: string[]; responseContains?: string[]; responseNotContains?: string[]; toolCalls?: string[]; } | undefined

response

string

toolsCalled

string[]

transitions

object[]

latencyMs

number

extractionSnapshot?

Record<string, unknown>

— flow context.collectedData after the turn (optional).

object[]