peerbench 0.0.6 → 0.0.8
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/aggregators/abstract.d.ts +10 -0
- package/dist/aggregators/index.d.ts +2 -67
- package/dist/aggregators/llm/avg.d.ts +26 -0
- package/dist/benchmarks/examples/echo-basic/index.d.ts +4 -0
- package/dist/benchmarks/examples/echo-basic/runner.d.ts +273 -0
- package/dist/benchmarks/examples/echo-basic/schema-sets/echo.v1.d.ts +241 -0
- package/dist/benchmarks/examples/echo-basic/storages/json.d.ts +14 -0
- package/dist/benchmarks/examples/echo-basic/storages/text.d.ts +24 -0
- package/dist/benchmarks/examples/exact-match-scorer/index.d.ts +4 -0
- package/dist/benchmarks/examples/exact-match-scorer/runner.d.ts +428 -0
- package/dist/benchmarks/examples/exact-match-scorer/schema-sets/exact-match.v1.d.ts +287 -0
- package/dist/benchmarks/examples/exact-match-scorer/scorer.d.ts +30 -0
- package/dist/benchmarks/examples/exact-match-scorer/storages/json.d.ts +8 -0
- package/dist/benchmarks/examples/text-transform/index.d.ts +4 -0
- package/dist/benchmarks/examples/text-transform/runner.d.ts +524 -0
- package/dist/benchmarks/examples/text-transform/schema-sets/echo.v1.d.ts +211 -0
- package/dist/benchmarks/examples/text-transform/schema-sets/namespace.d.ts +1 -0
- package/dist/benchmarks/examples/text-transform/schema-sets/reverse.v1.d.ts +216 -0
- package/dist/benchmarks/examples/text-transform/storages/json.d.ts +9 -0
- package/dist/benchmarks/index.d.ts +1 -1667
- package/dist/benchmarks/index.js +4 -4
- package/dist/benchmarks/peerbench/index.d.ts +5 -0
- package/dist/benchmarks/peerbench/runner.d.ts +754 -0
- package/dist/benchmarks/peerbench/schema-sets/mcq.v1.d.ts +261 -0
- package/dist/benchmarks/peerbench/schema-sets/multi-turn.v1.d.ts +351 -0
- package/dist/benchmarks/peerbench/schema-sets/qa.v1.d.ts +256 -0
- package/dist/benchmarks/peerbench/storages/json.d.ts +10 -0
- package/dist/{chunk-DNGT4SJC.js → chunk-3JHDJEY3.js} +16 -7
- package/dist/chunk-3JHDJEY3.js.map +1 -0
- package/dist/{chunk-3JF7SHLC.js → chunk-SMLNDQFX.js} +16 -7
- package/dist/chunk-SMLNDQFX.js.map +1 -0
- package/dist/constants.d.ts +4 -0
- package/dist/errors/index.d.ts +2 -0
- package/dist/errors/peerbench.d.ts +6 -0
- package/dist/errors/polyfill.d.ts +1 -0
- package/dist/examples/basic.d.ts +1 -0
- package/dist/helpers/define-runner.d.ts +45 -0
- package/dist/helpers/index.d.ts +1 -0
- package/dist/index.d.ts +6 -101
- package/dist/providers/abstract/llm.d.ts +20 -0
- package/dist/providers/abstract/provider.d.ts +14 -0
- package/dist/providers/example/echo.d.ts +12 -0
- package/dist/providers/example/restapi.d.ts +37 -0
- package/dist/providers/index.d.ts +5 -84
- package/dist/providers/index.js +1 -1
- package/dist/providers/mastra.d.ts +40 -0
- package/dist/providers/openai.d.ts +29 -0
- package/dist/providers/openrouter.d.ts +27 -0
- package/dist/schemas/extensions/index.d.ts +18 -22
- package/dist/schemas/extensions/response/llm.d.ts +14 -0
- package/dist/schemas/extensions/score/llm-as-a-judge-scorer.d.ts +15 -0
- package/dist/schemas/id.d.ts +2 -0
- package/dist/schemas/index.d.ts +4 -200
- package/dist/schemas/llm/index.d.ts +2 -116
- package/dist/schemas/llm/simple-system-prompt.d.ts +51 -0
- package/dist/schemas/llm/system-prompt.d.ts +59 -0
- package/dist/schemas/response.d.ts +63 -0
- package/dist/schemas/schema-definer.d.ts +47 -0
- package/dist/schemas/score.d.ts +73 -0
- package/dist/schemas/test-case.d.ts +57 -0
- package/dist/scorers/abstract.d.ts +16 -0
- package/dist/scorers/index.d.ts +4 -64
- package/dist/scorers/index.js +1 -1
- package/dist/scorers/llm-judge.d.ts +55 -0
- package/dist/scorers/mcq.d.ts +19 -0
- package/dist/scorers/mcq.test.d.ts +1 -0
- package/dist/scorers/regex.d.ts +58 -0
- package/dist/scorers/regex.test.d.ts +1 -0
- package/dist/storages/abstract.d.ts +7 -0
- package/dist/storages/examples/http.d.ts +1 -0
- package/dist/storages/examples/sqlite.d.ts +1 -0
- package/dist/storages/file.d.ts +43 -0
- package/dist/storages/http.d.ts +22 -0
- package/dist/storages/index.d.ts +5 -69
- package/dist/storages/json-file.d.ts +21 -0
- package/dist/storages/sqlite.d.ts +41 -0
- package/dist/types/index.d.ts +17 -0
- package/dist/types/runner.d.ts +18 -0
- package/dist/utilities.d.ts +9 -0
- package/dist/utils/id-generator.d.ts +2 -0
- package/dist/utils/index.d.ts +5 -0
- package/dist/utils/json.d.ts +17 -0
- package/dist/utils/llm.d.ts +7 -0
- package/dist/{rate-limiter-CSmVIRsM.d.ts → utils/rate-limiter.d.ts} +3 -5
- package/dist/utils/sleep.d.ts +1 -0
- package/dist/utils/string.d.ts +8 -0
- package/package.json +3 -3
- package/dist/abstract-Dec9Sc5O.d.ts +0 -12
- package/dist/chunk-3JF7SHLC.js.map +0 -1
- package/dist/chunk-DNGT4SJC.js.map +0 -1
- package/dist/index-BAioQhp2.d.ts +0 -27
- package/dist/json-file-Bgv9TLcX.d.ts +0 -74
- package/dist/llm-BND163ns.d.ts +0 -23
- package/dist/llm-judge-BS_oNYUK.d.ts +0 -67
- package/dist/provider-BDjGp2y-.d.ts +0 -10
|
@@ -0,0 +1,428 @@
|
|
|
1
|
+
import { AbstractLLMProvider } from "../../../providers/index.js";
|
|
2
|
+
import { LLMAsAJudgeScorer } from "../../../scorers/index.js";
|
|
3
|
+
import z from "zod";
|
|
4
|
+
import { ExactMatchScorer } from "./scorer";
|
|
5
|
+
export declare const exactMatchScorerRunner: ((params: {
|
|
6
|
+
testCase: {
|
|
7
|
+
id: string;
|
|
8
|
+
instruction: string;
|
|
9
|
+
input: string;
|
|
10
|
+
expectedOutput: string;
|
|
11
|
+
namespace: "example.peerbench.ai";
|
|
12
|
+
kind: "llm/exact-match.tc";
|
|
13
|
+
schemaVersion: 1;
|
|
14
|
+
metadata?: Record<string, unknown> | undefined;
|
|
15
|
+
normalize?: boolean | undefined;
|
|
16
|
+
};
|
|
17
|
+
provider: AbstractLLMProvider;
|
|
18
|
+
scorer?: LLMAsAJudgeScorer | ExactMatchScorer | undefined;
|
|
19
|
+
runConfig: {
|
|
20
|
+
model: string;
|
|
21
|
+
temperature?: number | undefined;
|
|
22
|
+
systemPrompt?: {
|
|
23
|
+
id: string;
|
|
24
|
+
version: number;
|
|
25
|
+
content: string;
|
|
26
|
+
namespace: "peerbench.ai";
|
|
27
|
+
kind: `${string}/simple.sys-prompt`;
|
|
28
|
+
schemaVersion: 1;
|
|
29
|
+
metadata?: Record<string, unknown> | undefined;
|
|
30
|
+
} | undefined;
|
|
31
|
+
llmJudgeModel?: string | undefined;
|
|
32
|
+
};
|
|
33
|
+
idGenerators?: {
|
|
34
|
+
response?: import("../../../types").IdGenerator;
|
|
35
|
+
score?: import("../../../types").IdGenerator;
|
|
36
|
+
};
|
|
37
|
+
}) => Promise<{
|
|
38
|
+
response: {
|
|
39
|
+
startedAt: number;
|
|
40
|
+
completedAt: number;
|
|
41
|
+
id: string;
|
|
42
|
+
testCaseId: string;
|
|
43
|
+
data: string;
|
|
44
|
+
modelSlug: string;
|
|
45
|
+
provider: string;
|
|
46
|
+
namespace: "example.peerbench.ai";
|
|
47
|
+
kind: "llm/exact-match.rs";
|
|
48
|
+
schemaVersion: 1;
|
|
49
|
+
metadata?: Record<string, unknown> | undefined;
|
|
50
|
+
systemPromptId?: string | undefined;
|
|
51
|
+
inputTokensUsed?: number | undefined;
|
|
52
|
+
outputTokensUsed?: number | undefined;
|
|
53
|
+
inputCost?: string | undefined;
|
|
54
|
+
outputCost?: string | undefined;
|
|
55
|
+
};
|
|
56
|
+
score?: {
|
|
57
|
+
id: string;
|
|
58
|
+
value: number;
|
|
59
|
+
responseId: string;
|
|
60
|
+
scoringMethod: "ai" | "human" | "algo";
|
|
61
|
+
match: boolean;
|
|
62
|
+
namespace: "example.peerbench.ai";
|
|
63
|
+
kind: "llm/exact-match.sc";
|
|
64
|
+
schemaVersion: 1;
|
|
65
|
+
metadata?: Record<string, unknown> | undefined;
|
|
66
|
+
explanation?: string | undefined;
|
|
67
|
+
normalized?: {
|
|
68
|
+
expected: string;
|
|
69
|
+
actual: string;
|
|
70
|
+
} | undefined;
|
|
71
|
+
scorerAISystemPrompt?: string | undefined;
|
|
72
|
+
scorerAISystemPromptId?: string | undefined;
|
|
73
|
+
scorerAIProvider?: string | undefined;
|
|
74
|
+
scorerAIModelSlug?: string | undefined;
|
|
75
|
+
scorerAIInputTokensUsed?: number | undefined;
|
|
76
|
+
scorerAIOutputTokensUsed?: number | undefined;
|
|
77
|
+
scorerAIInputCost?: string | undefined;
|
|
78
|
+
scorerAIOutputCost?: string | undefined;
|
|
79
|
+
} | undefined;
|
|
80
|
+
}>) & {
|
|
81
|
+
config: {
|
|
82
|
+
runConfigSchema: z.ZodObject<{
|
|
83
|
+
model: z.ZodString;
|
|
84
|
+
temperature: z.ZodOptional<z.ZodNumber>;
|
|
85
|
+
systemPrompt: z.ZodOptional<z.ZodObject<Omit<{
|
|
86
|
+
id: z.ZodString;
|
|
87
|
+
namespace: z.ZodString;
|
|
88
|
+
kind: z.ZodString;
|
|
89
|
+
schemaVersion: z.ZodNumber;
|
|
90
|
+
version: z.ZodNumber;
|
|
91
|
+
metadata: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
|
|
92
|
+
}, "kind" | "namespace" | "schemaVersion"> & {
|
|
93
|
+
content: z.ZodString;
|
|
94
|
+
} & {
|
|
95
|
+
namespace: z.ZodLiteral<"peerbench.ai">;
|
|
96
|
+
kind: z.ZodLiteral<`${string}/simple.sys-prompt`>;
|
|
97
|
+
schemaVersion: z.ZodLiteral<1>;
|
|
98
|
+
}, z.core.$strip> & {
|
|
99
|
+
new: (input: Omit<{
|
|
100
|
+
id: string;
|
|
101
|
+
version: number;
|
|
102
|
+
content: string;
|
|
103
|
+
namespace: "peerbench.ai";
|
|
104
|
+
kind: `${string}/simple.sys-prompt`;
|
|
105
|
+
schemaVersion: 1;
|
|
106
|
+
metadata?: Record<string, unknown> | undefined;
|
|
107
|
+
}, "kind" | "namespace" | "schemaVersion">) => {
|
|
108
|
+
id: string;
|
|
109
|
+
version: number;
|
|
110
|
+
content: string;
|
|
111
|
+
namespace: "peerbench.ai";
|
|
112
|
+
kind: `${string}/simple.sys-prompt`;
|
|
113
|
+
schemaVersion: 1;
|
|
114
|
+
metadata?: Record<string, unknown> | undefined;
|
|
115
|
+
};
|
|
116
|
+
newWithId(input: Omit<{
|
|
117
|
+
id: string;
|
|
118
|
+
version: number;
|
|
119
|
+
content: string;
|
|
120
|
+
namespace: "peerbench.ai";
|
|
121
|
+
kind: `${string}/simple.sys-prompt`;
|
|
122
|
+
schemaVersion: 1;
|
|
123
|
+
metadata?: Record<string, unknown> | undefined;
|
|
124
|
+
}, "kind" | "id" | "namespace" | "schemaVersion">, generator: import("../../../types").IdGenerator): Promise<{
|
|
125
|
+
id: string;
|
|
126
|
+
version: number;
|
|
127
|
+
content: string;
|
|
128
|
+
namespace: "peerbench.ai";
|
|
129
|
+
kind: `${string}/simple.sys-prompt`;
|
|
130
|
+
schemaVersion: 1;
|
|
131
|
+
metadata?: Record<string, unknown> | undefined;
|
|
132
|
+
}>;
|
|
133
|
+
}>;
|
|
134
|
+
llmJudgeModel: z.ZodOptional<z.ZodString>;
|
|
135
|
+
}, z.core.$strip>;
|
|
136
|
+
schemaSets: [{
|
|
137
|
+
readonly testCase: z.ZodObject<Omit<{
|
|
138
|
+
id: z.ZodString;
|
|
139
|
+
namespace: z.ZodString;
|
|
140
|
+
schemaVersion: z.ZodNumber;
|
|
141
|
+
kind: z.ZodString;
|
|
142
|
+
metadata: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
|
|
143
|
+
}, "kind" | "namespace" | "schemaVersion"> & {
|
|
144
|
+
instruction: z.ZodString;
|
|
145
|
+
input: z.ZodString;
|
|
146
|
+
expectedOutput: z.ZodString;
|
|
147
|
+
normalize: z.ZodOptional<z.ZodBoolean>;
|
|
148
|
+
} & {
|
|
149
|
+
namespace: z.ZodLiteral<"example.peerbench.ai">;
|
|
150
|
+
kind: z.ZodLiteral<"llm/exact-match.tc">;
|
|
151
|
+
schemaVersion: z.ZodLiteral<1>;
|
|
152
|
+
}, z.core.$strip> & {
|
|
153
|
+
new: (input: Omit<{
|
|
154
|
+
id: string;
|
|
155
|
+
instruction: string;
|
|
156
|
+
input: string;
|
|
157
|
+
expectedOutput: string;
|
|
158
|
+
namespace: "example.peerbench.ai";
|
|
159
|
+
kind: "llm/exact-match.tc";
|
|
160
|
+
schemaVersion: 1;
|
|
161
|
+
metadata?: Record<string, unknown> | undefined;
|
|
162
|
+
normalize?: boolean | undefined;
|
|
163
|
+
}, "kind" | "namespace" | "schemaVersion">) => {
|
|
164
|
+
id: string;
|
|
165
|
+
instruction: string;
|
|
166
|
+
input: string;
|
|
167
|
+
expectedOutput: string;
|
|
168
|
+
namespace: "example.peerbench.ai";
|
|
169
|
+
kind: "llm/exact-match.tc";
|
|
170
|
+
schemaVersion: 1;
|
|
171
|
+
metadata?: Record<string, unknown> | undefined;
|
|
172
|
+
normalize?: boolean | undefined;
|
|
173
|
+
};
|
|
174
|
+
newWithId(input: Omit<{
|
|
175
|
+
id: string;
|
|
176
|
+
instruction: string;
|
|
177
|
+
input: string;
|
|
178
|
+
expectedOutput: string;
|
|
179
|
+
namespace: "example.peerbench.ai";
|
|
180
|
+
kind: "llm/exact-match.tc";
|
|
181
|
+
schemaVersion: 1;
|
|
182
|
+
metadata?: Record<string, unknown> | undefined;
|
|
183
|
+
normalize?: boolean | undefined;
|
|
184
|
+
}, "kind" | "id" | "namespace" | "schemaVersion">, generator: import("../../../types").IdGenerator): Promise<{
|
|
185
|
+
id: string;
|
|
186
|
+
instruction: string;
|
|
187
|
+
input: string;
|
|
188
|
+
expectedOutput: string;
|
|
189
|
+
namespace: "example.peerbench.ai";
|
|
190
|
+
kind: "llm/exact-match.tc";
|
|
191
|
+
schemaVersion: 1;
|
|
192
|
+
metadata?: Record<string, unknown> | undefined;
|
|
193
|
+
normalize?: boolean | undefined;
|
|
194
|
+
}>;
|
|
195
|
+
};
|
|
196
|
+
readonly response: z.ZodObject<Omit<{
|
|
197
|
+
id: z.ZodString;
|
|
198
|
+
namespace: z.ZodString;
|
|
199
|
+
schemaVersion: z.ZodNumber;
|
|
200
|
+
kind: z.ZodString;
|
|
201
|
+
startedAt: z.ZodNumber;
|
|
202
|
+
completedAt: z.ZodNumber;
|
|
203
|
+
testCaseId: z.ZodString;
|
|
204
|
+
metadata: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
|
|
205
|
+
}, "kind" | "namespace" | "schemaVersion"> & {
|
|
206
|
+
data: z.ZodString;
|
|
207
|
+
modelSlug: z.ZodString;
|
|
208
|
+
provider: z.ZodString;
|
|
209
|
+
systemPromptId: z.ZodOptional<z.ZodString>;
|
|
210
|
+
inputTokensUsed: z.ZodOptional<z.ZodNumber>;
|
|
211
|
+
outputTokensUsed: z.ZodOptional<z.ZodNumber>;
|
|
212
|
+
inputCost: z.ZodOptional<z.ZodString>;
|
|
213
|
+
outputCost: z.ZodOptional<z.ZodString>;
|
|
214
|
+
} & {
|
|
215
|
+
namespace: z.ZodLiteral<"example.peerbench.ai">;
|
|
216
|
+
kind: z.ZodLiteral<"llm/exact-match.rs">;
|
|
217
|
+
schemaVersion: z.ZodLiteral<1>;
|
|
218
|
+
}, z.core.$strip> & {
|
|
219
|
+
new: (input: Omit<{
|
|
220
|
+
startedAt: number;
|
|
221
|
+
completedAt: number;
|
|
222
|
+
id: string;
|
|
223
|
+
testCaseId: string;
|
|
224
|
+
data: string;
|
|
225
|
+
modelSlug: string;
|
|
226
|
+
provider: string;
|
|
227
|
+
namespace: "example.peerbench.ai";
|
|
228
|
+
kind: "llm/exact-match.rs";
|
|
229
|
+
schemaVersion: 1;
|
|
230
|
+
metadata?: Record<string, unknown> | undefined;
|
|
231
|
+
systemPromptId?: string | undefined;
|
|
232
|
+
inputTokensUsed?: number | undefined;
|
|
233
|
+
outputTokensUsed?: number | undefined;
|
|
234
|
+
inputCost?: string | undefined;
|
|
235
|
+
outputCost?: string | undefined;
|
|
236
|
+
}, "kind" | "namespace" | "schemaVersion">) => {
|
|
237
|
+
startedAt: number;
|
|
238
|
+
completedAt: number;
|
|
239
|
+
id: string;
|
|
240
|
+
testCaseId: string;
|
|
241
|
+
data: string;
|
|
242
|
+
modelSlug: string;
|
|
243
|
+
provider: string;
|
|
244
|
+
namespace: "example.peerbench.ai";
|
|
245
|
+
kind: "llm/exact-match.rs";
|
|
246
|
+
schemaVersion: 1;
|
|
247
|
+
metadata?: Record<string, unknown> | undefined;
|
|
248
|
+
systemPromptId?: string | undefined;
|
|
249
|
+
inputTokensUsed?: number | undefined;
|
|
250
|
+
outputTokensUsed?: number | undefined;
|
|
251
|
+
inputCost?: string | undefined;
|
|
252
|
+
outputCost?: string | undefined;
|
|
253
|
+
};
|
|
254
|
+
newWithId(input: Omit<{
|
|
255
|
+
startedAt: number;
|
|
256
|
+
completedAt: number;
|
|
257
|
+
id: string;
|
|
258
|
+
testCaseId: string;
|
|
259
|
+
data: string;
|
|
260
|
+
modelSlug: string;
|
|
261
|
+
provider: string;
|
|
262
|
+
namespace: "example.peerbench.ai";
|
|
263
|
+
kind: "llm/exact-match.rs";
|
|
264
|
+
schemaVersion: 1;
|
|
265
|
+
metadata?: Record<string, unknown> | undefined;
|
|
266
|
+
systemPromptId?: string | undefined;
|
|
267
|
+
inputTokensUsed?: number | undefined;
|
|
268
|
+
outputTokensUsed?: number | undefined;
|
|
269
|
+
inputCost?: string | undefined;
|
|
270
|
+
outputCost?: string | undefined;
|
|
271
|
+
}, "kind" | "id" | "namespace" | "schemaVersion">, generator: import("../../../types").IdGenerator): Promise<{
|
|
272
|
+
startedAt: number;
|
|
273
|
+
completedAt: number;
|
|
274
|
+
id: string;
|
|
275
|
+
testCaseId: string;
|
|
276
|
+
data: string;
|
|
277
|
+
modelSlug: string;
|
|
278
|
+
provider: string;
|
|
279
|
+
namespace: "example.peerbench.ai";
|
|
280
|
+
kind: "llm/exact-match.rs";
|
|
281
|
+
schemaVersion: 1;
|
|
282
|
+
metadata?: Record<string, unknown> | undefined;
|
|
283
|
+
systemPromptId?: string | undefined;
|
|
284
|
+
inputTokensUsed?: number | undefined;
|
|
285
|
+
outputTokensUsed?: number | undefined;
|
|
286
|
+
inputCost?: string | undefined;
|
|
287
|
+
outputCost?: string | undefined;
|
|
288
|
+
}>;
|
|
289
|
+
};
|
|
290
|
+
readonly score: z.ZodObject<Omit<{
|
|
291
|
+
id: z.ZodString;
|
|
292
|
+
namespace: z.ZodString;
|
|
293
|
+
kind: z.ZodString;
|
|
294
|
+
schemaVersion: z.ZodNumber;
|
|
295
|
+
value: z.ZodNumber;
|
|
296
|
+
responseId: z.ZodString;
|
|
297
|
+
explanation: z.ZodOptional<z.ZodString>;
|
|
298
|
+
metadata: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
|
|
299
|
+
scoringMethod: z.ZodEnum<{
|
|
300
|
+
readonly ai: "ai";
|
|
301
|
+
readonly human: "human";
|
|
302
|
+
readonly algo: "algo";
|
|
303
|
+
}>;
|
|
304
|
+
}, "kind" | "namespace" | "schemaVersion"> & {
|
|
305
|
+
match: z.ZodBoolean;
|
|
306
|
+
normalized: z.ZodOptional<z.ZodObject<{
|
|
307
|
+
expected: z.ZodString;
|
|
308
|
+
actual: z.ZodString;
|
|
309
|
+
}, z.core.$strip>>;
|
|
310
|
+
scorerAISystemPrompt: z.ZodOptional<z.ZodString>;
|
|
311
|
+
scorerAISystemPromptId: z.ZodOptional<z.ZodString>;
|
|
312
|
+
scorerAIProvider: z.ZodOptional<z.ZodString>;
|
|
313
|
+
scorerAIModelSlug: z.ZodOptional<z.ZodString>;
|
|
314
|
+
scorerAIInputTokensUsed: z.ZodOptional<z.ZodNumber>;
|
|
315
|
+
scorerAIOutputTokensUsed: z.ZodOptional<z.ZodNumber>;
|
|
316
|
+
scorerAIInputCost: z.ZodOptional<z.ZodString>;
|
|
317
|
+
scorerAIOutputCost: z.ZodOptional<z.ZodString>;
|
|
318
|
+
} & {
|
|
319
|
+
namespace: z.ZodLiteral<"example.peerbench.ai">;
|
|
320
|
+
kind: z.ZodLiteral<"llm/exact-match.sc">;
|
|
321
|
+
schemaVersion: z.ZodLiteral<1>;
|
|
322
|
+
}, z.core.$strip> & {
|
|
323
|
+
new: (input: Omit<{
|
|
324
|
+
id: string;
|
|
325
|
+
value: number;
|
|
326
|
+
responseId: string;
|
|
327
|
+
scoringMethod: "ai" | "human" | "algo";
|
|
328
|
+
match: boolean;
|
|
329
|
+
namespace: "example.peerbench.ai";
|
|
330
|
+
kind: "llm/exact-match.sc";
|
|
331
|
+
schemaVersion: 1;
|
|
332
|
+
metadata?: Record<string, unknown> | undefined;
|
|
333
|
+
explanation?: string | undefined;
|
|
334
|
+
normalized?: {
|
|
335
|
+
expected: string;
|
|
336
|
+
actual: string;
|
|
337
|
+
} | undefined;
|
|
338
|
+
scorerAISystemPrompt?: string | undefined;
|
|
339
|
+
scorerAISystemPromptId?: string | undefined;
|
|
340
|
+
scorerAIProvider?: string | undefined;
|
|
341
|
+
scorerAIModelSlug?: string | undefined;
|
|
342
|
+
scorerAIInputTokensUsed?: number | undefined;
|
|
343
|
+
scorerAIOutputTokensUsed?: number | undefined;
|
|
344
|
+
scorerAIInputCost?: string | undefined;
|
|
345
|
+
scorerAIOutputCost?: string | undefined;
|
|
346
|
+
}, "kind" | "namespace" | "schemaVersion">) => {
|
|
347
|
+
id: string;
|
|
348
|
+
value: number;
|
|
349
|
+
responseId: string;
|
|
350
|
+
scoringMethod: "ai" | "human" | "algo";
|
|
351
|
+
match: boolean;
|
|
352
|
+
namespace: "example.peerbench.ai";
|
|
353
|
+
kind: "llm/exact-match.sc";
|
|
354
|
+
schemaVersion: 1;
|
|
355
|
+
metadata?: Record<string, unknown> | undefined;
|
|
356
|
+
explanation?: string | undefined;
|
|
357
|
+
normalized?: {
|
|
358
|
+
expected: string;
|
|
359
|
+
actual: string;
|
|
360
|
+
} | undefined;
|
|
361
|
+
scorerAISystemPrompt?: string | undefined;
|
|
362
|
+
scorerAISystemPromptId?: string | undefined;
|
|
363
|
+
scorerAIProvider?: string | undefined;
|
|
364
|
+
scorerAIModelSlug?: string | undefined;
|
|
365
|
+
scorerAIInputTokensUsed?: number | undefined;
|
|
366
|
+
scorerAIOutputTokensUsed?: number | undefined;
|
|
367
|
+
scorerAIInputCost?: string | undefined;
|
|
368
|
+
scorerAIOutputCost?: string | undefined;
|
|
369
|
+
};
|
|
370
|
+
newWithId(input: Omit<{
|
|
371
|
+
id: string;
|
|
372
|
+
value: number;
|
|
373
|
+
responseId: string;
|
|
374
|
+
scoringMethod: "ai" | "human" | "algo";
|
|
375
|
+
match: boolean;
|
|
376
|
+
namespace: "example.peerbench.ai";
|
|
377
|
+
kind: "llm/exact-match.sc";
|
|
378
|
+
schemaVersion: 1;
|
|
379
|
+
metadata?: Record<string, unknown> | undefined;
|
|
380
|
+
explanation?: string | undefined;
|
|
381
|
+
normalized?: {
|
|
382
|
+
expected: string;
|
|
383
|
+
actual: string;
|
|
384
|
+
} | undefined;
|
|
385
|
+
scorerAISystemPrompt?: string | undefined;
|
|
386
|
+
scorerAISystemPromptId?: string | undefined;
|
|
387
|
+
scorerAIProvider?: string | undefined;
|
|
388
|
+
scorerAIModelSlug?: string | undefined;
|
|
389
|
+
scorerAIInputTokensUsed?: number | undefined;
|
|
390
|
+
scorerAIOutputTokensUsed?: number | undefined;
|
|
391
|
+
scorerAIInputCost?: string | undefined;
|
|
392
|
+
scorerAIOutputCost?: string | undefined;
|
|
393
|
+
}, "kind" | "id" | "namespace" | "schemaVersion">, generator: import("../../../types").IdGenerator): Promise<{
|
|
394
|
+
id: string;
|
|
395
|
+
value: number;
|
|
396
|
+
responseId: string;
|
|
397
|
+
scoringMethod: "ai" | "human" | "algo";
|
|
398
|
+
match: boolean;
|
|
399
|
+
namespace: "example.peerbench.ai";
|
|
400
|
+
kind: "llm/exact-match.sc";
|
|
401
|
+
schemaVersion: 1;
|
|
402
|
+
metadata?: Record<string, unknown> | undefined;
|
|
403
|
+
explanation?: string | undefined;
|
|
404
|
+
normalized?: {
|
|
405
|
+
expected: string;
|
|
406
|
+
actual: string;
|
|
407
|
+
} | undefined;
|
|
408
|
+
scorerAISystemPrompt?: string | undefined;
|
|
409
|
+
scorerAISystemPromptId?: string | undefined;
|
|
410
|
+
scorerAIProvider?: string | undefined;
|
|
411
|
+
scorerAIModelSlug?: string | undefined;
|
|
412
|
+
scorerAIInputTokensUsed?: number | undefined;
|
|
413
|
+
scorerAIOutputTokensUsed?: number | undefined;
|
|
414
|
+
scorerAIInputCost?: string | undefined;
|
|
415
|
+
scorerAIOutputCost?: string | undefined;
|
|
416
|
+
}>;
|
|
417
|
+
};
|
|
418
|
+
}];
|
|
419
|
+
providers: [typeof AbstractLLMProvider];
|
|
420
|
+
scorers: [typeof ExactMatchScorer, typeof LLMAsAJudgeScorer];
|
|
421
|
+
parseRunConfig?: boolean;
|
|
422
|
+
defaults?: {
|
|
423
|
+
scorer?: LLMAsAJudgeScorer | ExactMatchScorer | undefined;
|
|
424
|
+
responseIdGenerator?: import("../../../types").IdGenerator;
|
|
425
|
+
scoreIdGenerator?: import("../../../types").IdGenerator;
|
|
426
|
+
} | undefined;
|
|
427
|
+
};
|
|
428
|
+
};
|