Skip to content

chatbot/__benchmarks__/types

This page is auto-generated from TSDoc output. Edit the source file, not this Markdown.

  • Package: @leipzigtreechat/chatbot
  • Source file: packages/chatbot/src/__benchmarks__/types.ts

No summary is available for this file.

type BenchmarkCaseKind = "question" | "dialogue"

Defined at: line 3

type BenchmarkAxis = "task_completion" | "grounding" | "flow_correctness" | "graceful_failure" | "presentation"

Defined at: line 4

type BenchmarkStatus = "pass" | "soft-fail" | "fail"

Defined at: line 5

type BenchmarkSignalTarget = "assistant_last" | "assistant_any" | "transcript" | "metadata"

Defined at: line 6

type BenchmarkMatchMode = "includes" | "regex"

Defined at: line 7

type ClarificationExpectation = "required" | "forbidden" | "allowed"

Defined at: line 8

type BenchmarkSignal = {
label: string;
value: string;
axis: BenchmarkAxis;
critical: boolean;
target?: BenchmarkSignalTarget;
mode?: BenchmarkMatchMode;
flags?: string;
caseSensitive?: boolean;
}

Defined at: line 10

type BenchmarkExpectedFlow = {
clarification: ClarificationExpectation;
requiredMetadataStatuses?: ChatBotMetadataStatus[];
forbiddenMetadataStatuses?: ChatBotMetadataStatus[];
minAssistantMessages?: number;
}

Defined at: line 21

type BenchmarkFixture = {
id: string;
title: string;
kind: BenchmarkCaseKind;
userTurns: string[];
expectedFlow: BenchmarkExpectedFlow;
requiredSignals: BenchmarkSignal[];
forbiddenSignals: BenchmarkSignal[];
notes: string;
}

Defined at: line 28

type BenchmarkTranscriptEntry = {
role: "user" | "assistant";
content: string;
timestamp: string;
turnIndex: number | null;
}

Defined at: line 39

type BenchmarkMetadataEntry = {
status: ChatBotMetadataStatus;
message: string;
timestamp: string;
}

Defined at: line 46

type BenchmarkTurnTiming = {
turnIndex: number;
userPrompt: string;
startedAt: string;
firstAssistantResponseAt?: string;
latencyMs?: number;
}

Defined at: line 52

type BenchmarkCheckResult = {
label: string;
axis: BenchmarkAxis;
critical: boolean;
passed: boolean;
details: string;
}

Defined at: line 60

type BenchmarkAxisResult = {
axis: BenchmarkAxis;
passed: boolean;
applicable: boolean;
summary: string;
checks: BenchmarkCheckResult[];
}

Defined at: line 68

type BenchmarkEvaluation = {
status: BenchmarkStatus;
score: number;
failureReason?: string;
axes: BenchmarkAxisResult[];
}

Defined at: line 76

type BenchmarkCaseResult = {
fixture: BenchmarkFixture;
transcript: BenchmarkTranscriptEntry[];
metadata: BenchmarkMetadataEntry[];
turnTimings: BenchmarkTurnTiming[];
totalDurationMs: number;
evaluation: BenchmarkEvaluation;
runtimeError?: string;
}

Defined at: line 83

type BenchmarkRunResult = {
startedAt: string;
finishedAt: string;
totalDurationMs: number;
cases: BenchmarkCaseResult[];
}

Defined at: line 93