@artemiskit/core 0.1.6 → 0.2.2

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.
Files changed (56) hide show
  1. package/CHANGELOG.md +116 -0
  2. package/dist/adapters/types.d.ts +8 -1
  3. package/dist/adapters/types.d.ts.map +1 -1
  4. package/dist/artifacts/types.d.ts +39 -0
  5. package/dist/artifacts/types.d.ts.map +1 -1
  6. package/dist/cost/index.d.ts +5 -0
  7. package/dist/cost/index.d.ts.map +1 -0
  8. package/dist/cost/pricing.d.ts +67 -0
  9. package/dist/cost/pricing.d.ts.map +1 -0
  10. package/dist/evaluators/combined.d.ts +10 -0
  11. package/dist/evaluators/combined.d.ts.map +1 -0
  12. package/dist/evaluators/index.d.ts +4 -0
  13. package/dist/evaluators/index.d.ts.map +1 -1
  14. package/dist/evaluators/inline.d.ts +22 -0
  15. package/dist/evaluators/inline.d.ts.map +1 -0
  16. package/dist/evaluators/llm-grader.d.ts.map +1 -1
  17. package/dist/evaluators/not-contains.d.ts +10 -0
  18. package/dist/evaluators/not-contains.d.ts.map +1 -0
  19. package/dist/evaluators/similarity.d.ts +16 -0
  20. package/dist/evaluators/similarity.d.ts.map +1 -0
  21. package/dist/index.d.ts +1 -0
  22. package/dist/index.d.ts.map +1 -1
  23. package/dist/index.js +13212 -12018
  24. package/dist/scenario/discovery.d.ts +72 -0
  25. package/dist/scenario/discovery.d.ts.map +1 -0
  26. package/dist/scenario/index.d.ts +1 -0
  27. package/dist/scenario/index.d.ts.map +1 -1
  28. package/dist/scenario/schema.d.ts +1253 -9
  29. package/dist/scenario/schema.d.ts.map +1 -1
  30. package/dist/storage/local.d.ts +44 -2
  31. package/dist/storage/local.d.ts.map +1 -1
  32. package/dist/storage/types.d.ts +62 -0
  33. package/dist/storage/types.d.ts.map +1 -1
  34. package/package.json +1 -1
  35. package/src/adapters/types.ts +8 -1
  36. package/src/artifacts/types.ts +39 -0
  37. package/src/cost/index.ts +14 -0
  38. package/src/cost/pricing.ts +450 -0
  39. package/src/evaluators/combined.test.ts +172 -0
  40. package/src/evaluators/combined.ts +95 -0
  41. package/src/evaluators/index.ts +12 -0
  42. package/src/evaluators/inline.test.ts +409 -0
  43. package/src/evaluators/inline.ts +393 -0
  44. package/src/evaluators/llm-grader.ts +45 -13
  45. package/src/evaluators/not-contains.test.ts +105 -0
  46. package/src/evaluators/not-contains.ts +45 -0
  47. package/src/evaluators/similarity.test.ts +333 -0
  48. package/src/evaluators/similarity.ts +258 -0
  49. package/src/index.ts +3 -0
  50. package/src/scenario/discovery.test.ts +153 -0
  51. package/src/scenario/discovery.ts +277 -0
  52. package/src/scenario/index.ts +1 -0
  53. package/src/scenario/schema.ts +47 -2
  54. package/src/storage/local.test.ts +243 -0
  55. package/src/storage/local.ts +162 -2
  56. package/src/storage/types.ts +73 -0
@@ -21,6 +21,8 @@ export declare const ProviderConfigSchema: z.ZodOptional<z.ZodObject<{
21
21
  resourceName: z.ZodOptional<z.ZodString>;
22
22
  deploymentName: z.ZodOptional<z.ZodString>;
23
23
  apiVersion: z.ZodOptional<z.ZodString>;
24
+ embeddingDeploymentName: z.ZodOptional<z.ZodString>;
25
+ modelFamily: z.ZodOptional<z.ZodString>;
24
26
  underlyingProvider: z.ZodOptional<z.ZodEnum<["openai", "azure", "anthropic", "google", "mistral"]>>;
25
27
  }, "strip", z.ZodTypeAny, {
26
28
  apiKey?: string | undefined;
@@ -32,6 +34,8 @@ export declare const ProviderConfigSchema: z.ZodOptional<z.ZodObject<{
32
34
  resourceName?: string | undefined;
33
35
  deploymentName?: string | undefined;
34
36
  apiVersion?: string | undefined;
37
+ embeddingDeploymentName?: string | undefined;
38
+ modelFamily?: string | undefined;
35
39
  underlyingProvider?: "openai" | "anthropic" | "google" | "mistral" | "azure" | undefined;
36
40
  }, {
37
41
  apiKey?: string | undefined;
@@ -43,12 +47,15 @@ export declare const ProviderConfigSchema: z.ZodOptional<z.ZodObject<{
43
47
  resourceName?: string | undefined;
44
48
  deploymentName?: string | undefined;
45
49
  apiVersion?: string | undefined;
50
+ embeddingDeploymentName?: string | undefined;
51
+ modelFamily?: string | undefined;
46
52
  underlyingProvider?: "openai" | "anthropic" | "google" | "mistral" | "azure" | undefined;
47
53
  }>>;
48
54
  /**
49
55
  * Expected result types - how to evaluate responses
56
+ * Includes base types and combined type for logical grouping
50
57
  */
51
- export declare const ExpectedSchema: z.ZodDiscriminatedUnion<"type", [z.ZodObject<{
58
+ export declare const ExpectedSchema: z.ZodUnion<[z.ZodDiscriminatedUnion<"type", [z.ZodObject<{
52
59
  type: z.ZodLiteral<"exact">;
53
60
  value: z.ZodString;
54
61
  caseSensitive: z.ZodDefault<z.ZodOptional<z.ZodBoolean>>;
@@ -114,6 +121,18 @@ export declare const ExpectedSchema: z.ZodDiscriminatedUnion<"type", [z.ZodObjec
114
121
  values: string[];
115
122
  type: "contains";
116
123
  mode?: "all" | "any" | undefined;
124
+ }>, z.ZodObject<{
125
+ type: z.ZodLiteral<"not_contains">;
126
+ values: z.ZodArray<z.ZodString, "many">;
127
+ mode: z.ZodDefault<z.ZodEnum<["all", "any"]>>;
128
+ }, "strip", z.ZodTypeAny, {
129
+ values: string[];
130
+ type: "not_contains";
131
+ mode: "all" | "any";
132
+ }, {
133
+ values: string[];
134
+ type: "not_contains";
135
+ mode?: "all" | "any" | undefined;
117
136
  }>, z.ZodObject<{
118
137
  type: z.ZodLiteral<"json_schema">;
119
138
  schema: z.ZodRecord<z.ZodString, z.ZodUnknown>;
@@ -135,6 +154,277 @@ export declare const ExpectedSchema: z.ZodDiscriminatedUnion<"type", [z.ZodObjec
135
154
  type: "custom";
136
155
  evaluator: string;
137
156
  config?: Record<string, unknown> | undefined;
157
+ }>, z.ZodObject<{
158
+ type: z.ZodLiteral<"similarity">;
159
+ value: z.ZodString;
160
+ threshold: z.ZodDefault<z.ZodNumber>;
161
+ /** Mode for similarity evaluation: 'embedding' uses vector embeddings, 'llm' uses LLM-based comparison */
162
+ mode: z.ZodOptional<z.ZodEnum<["embedding", "llm"]>>;
163
+ /** Model for LLM-based similarity comparison (required when mode is 'llm') */
164
+ model: z.ZodOptional<z.ZodString>;
165
+ /** Embedding model to use for vector similarity (required when mode is 'embedding') */
166
+ embeddingModel: z.ZodOptional<z.ZodString>;
167
+ }, "strip", z.ZodTypeAny, {
168
+ value: string;
169
+ type: "similarity";
170
+ threshold: number;
171
+ model?: string | undefined;
172
+ mode?: "embedding" | "llm" | undefined;
173
+ embeddingModel?: string | undefined;
174
+ }, {
175
+ value: string;
176
+ type: "similarity";
177
+ threshold?: number | undefined;
178
+ model?: string | undefined;
179
+ mode?: "embedding" | "llm" | undefined;
180
+ embeddingModel?: string | undefined;
181
+ }>, z.ZodObject<{
182
+ type: z.ZodLiteral<"inline">;
183
+ expression: z.ZodString;
184
+ value: z.ZodOptional<z.ZodString>;
185
+ }, "strip", z.ZodTypeAny, {
186
+ type: "inline";
187
+ expression: string;
188
+ value?: string | undefined;
189
+ }, {
190
+ type: "inline";
191
+ expression: string;
192
+ value?: string | undefined;
193
+ }>]>, z.ZodObject<{
194
+ type: z.ZodLiteral<"combined">;
195
+ operator: z.ZodEnum<["and", "or"]>;
196
+ expectations: z.ZodArray<z.ZodDiscriminatedUnion<"type", [z.ZodObject<{
197
+ type: z.ZodLiteral<"exact">;
198
+ value: z.ZodString;
199
+ caseSensitive: z.ZodDefault<z.ZodOptional<z.ZodBoolean>>;
200
+ }, "strip", z.ZodTypeAny, {
201
+ value: string;
202
+ type: "exact";
203
+ caseSensitive: boolean;
204
+ }, {
205
+ value: string;
206
+ type: "exact";
207
+ caseSensitive?: boolean | undefined;
208
+ }>, z.ZodObject<{
209
+ type: z.ZodLiteral<"regex">;
210
+ pattern: z.ZodString;
211
+ flags: z.ZodOptional<z.ZodString>;
212
+ }, "strip", z.ZodTypeAny, {
213
+ type: "regex";
214
+ pattern: string;
215
+ flags?: string | undefined;
216
+ }, {
217
+ type: "regex";
218
+ pattern: string;
219
+ flags?: string | undefined;
220
+ }>, z.ZodObject<{
221
+ type: z.ZodLiteral<"fuzzy">;
222
+ value: z.ZodString;
223
+ threshold: z.ZodDefault<z.ZodNumber>;
224
+ }, "strip", z.ZodTypeAny, {
225
+ value: string;
226
+ type: "fuzzy";
227
+ threshold: number;
228
+ }, {
229
+ value: string;
230
+ type: "fuzzy";
231
+ threshold?: number | undefined;
232
+ }>, z.ZodObject<{
233
+ type: z.ZodLiteral<"llm_grader">;
234
+ rubric: z.ZodString;
235
+ model: z.ZodOptional<z.ZodString>;
236
+ provider: z.ZodOptional<z.ZodEnum<["openai", "azure-openai", "vercel-ai", "anthropic", "google", "mistral", "cohere", "huggingface", "ollama", "custom"]>>;
237
+ threshold: z.ZodDefault<z.ZodNumber>;
238
+ }, "strip", z.ZodTypeAny, {
239
+ type: "llm_grader";
240
+ threshold: number;
241
+ rubric: string;
242
+ provider?: "openai" | "azure-openai" | "vercel-ai" | "anthropic" | "google" | "mistral" | "cohere" | "huggingface" | "ollama" | "custom" | undefined;
243
+ model?: string | undefined;
244
+ }, {
245
+ type: "llm_grader";
246
+ rubric: string;
247
+ provider?: "openai" | "azure-openai" | "vercel-ai" | "anthropic" | "google" | "mistral" | "cohere" | "huggingface" | "ollama" | "custom" | undefined;
248
+ threshold?: number | undefined;
249
+ model?: string | undefined;
250
+ }>, z.ZodObject<{
251
+ type: z.ZodLiteral<"contains">;
252
+ values: z.ZodArray<z.ZodString, "many">;
253
+ mode: z.ZodDefault<z.ZodEnum<["all", "any"]>>;
254
+ }, "strip", z.ZodTypeAny, {
255
+ values: string[];
256
+ type: "contains";
257
+ mode: "all" | "any";
258
+ }, {
259
+ values: string[];
260
+ type: "contains";
261
+ mode?: "all" | "any" | undefined;
262
+ }>, z.ZodObject<{
263
+ type: z.ZodLiteral<"not_contains">;
264
+ values: z.ZodArray<z.ZodString, "many">;
265
+ mode: z.ZodDefault<z.ZodEnum<["all", "any"]>>;
266
+ }, "strip", z.ZodTypeAny, {
267
+ values: string[];
268
+ type: "not_contains";
269
+ mode: "all" | "any";
270
+ }, {
271
+ values: string[];
272
+ type: "not_contains";
273
+ mode?: "all" | "any" | undefined;
274
+ }>, z.ZodObject<{
275
+ type: z.ZodLiteral<"json_schema">;
276
+ schema: z.ZodRecord<z.ZodString, z.ZodUnknown>;
277
+ }, "strip", z.ZodTypeAny, {
278
+ type: "json_schema";
279
+ schema: Record<string, unknown>;
280
+ }, {
281
+ type: "json_schema";
282
+ schema: Record<string, unknown>;
283
+ }>, z.ZodObject<{
284
+ type: z.ZodLiteral<"custom">;
285
+ evaluator: z.ZodString;
286
+ config: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
287
+ }, "strip", z.ZodTypeAny, {
288
+ type: "custom";
289
+ evaluator: string;
290
+ config?: Record<string, unknown> | undefined;
291
+ }, {
292
+ type: "custom";
293
+ evaluator: string;
294
+ config?: Record<string, unknown> | undefined;
295
+ }>, z.ZodObject<{
296
+ type: z.ZodLiteral<"similarity">;
297
+ value: z.ZodString;
298
+ threshold: z.ZodDefault<z.ZodNumber>;
299
+ /** Mode for similarity evaluation: 'embedding' uses vector embeddings, 'llm' uses LLM-based comparison */
300
+ mode: z.ZodOptional<z.ZodEnum<["embedding", "llm"]>>;
301
+ /** Model for LLM-based similarity comparison (required when mode is 'llm') */
302
+ model: z.ZodOptional<z.ZodString>;
303
+ /** Embedding model to use for vector similarity (required when mode is 'embedding') */
304
+ embeddingModel: z.ZodOptional<z.ZodString>;
305
+ }, "strip", z.ZodTypeAny, {
306
+ value: string;
307
+ type: "similarity";
308
+ threshold: number;
309
+ model?: string | undefined;
310
+ mode?: "embedding" | "llm" | undefined;
311
+ embeddingModel?: string | undefined;
312
+ }, {
313
+ value: string;
314
+ type: "similarity";
315
+ threshold?: number | undefined;
316
+ model?: string | undefined;
317
+ mode?: "embedding" | "llm" | undefined;
318
+ embeddingModel?: string | undefined;
319
+ }>, z.ZodObject<{
320
+ type: z.ZodLiteral<"inline">;
321
+ expression: z.ZodString;
322
+ value: z.ZodOptional<z.ZodString>;
323
+ }, "strip", z.ZodTypeAny, {
324
+ type: "inline";
325
+ expression: string;
326
+ value?: string | undefined;
327
+ }, {
328
+ type: "inline";
329
+ expression: string;
330
+ value?: string | undefined;
331
+ }>]>, "many">;
332
+ }, "strip", z.ZodTypeAny, {
333
+ type: "combined";
334
+ operator: "and" | "or";
335
+ expectations: ({
336
+ value: string;
337
+ type: "exact";
338
+ caseSensitive: boolean;
339
+ } | {
340
+ type: "regex";
341
+ pattern: string;
342
+ flags?: string | undefined;
343
+ } | {
344
+ value: string;
345
+ type: "fuzzy";
346
+ threshold: number;
347
+ } | {
348
+ type: "llm_grader";
349
+ threshold: number;
350
+ rubric: string;
351
+ provider?: "openai" | "azure-openai" | "vercel-ai" | "anthropic" | "google" | "mistral" | "cohere" | "huggingface" | "ollama" | "custom" | undefined;
352
+ model?: string | undefined;
353
+ } | {
354
+ values: string[];
355
+ type: "contains";
356
+ mode: "all" | "any";
357
+ } | {
358
+ values: string[];
359
+ type: "not_contains";
360
+ mode: "all" | "any";
361
+ } | {
362
+ type: "json_schema";
363
+ schema: Record<string, unknown>;
364
+ } | {
365
+ type: "custom";
366
+ evaluator: string;
367
+ config?: Record<string, unknown> | undefined;
368
+ } | {
369
+ value: string;
370
+ type: "similarity";
371
+ threshold: number;
372
+ model?: string | undefined;
373
+ mode?: "embedding" | "llm" | undefined;
374
+ embeddingModel?: string | undefined;
375
+ } | {
376
+ type: "inline";
377
+ expression: string;
378
+ value?: string | undefined;
379
+ })[];
380
+ }, {
381
+ type: "combined";
382
+ operator: "and" | "or";
383
+ expectations: ({
384
+ value: string;
385
+ type: "exact";
386
+ caseSensitive?: boolean | undefined;
387
+ } | {
388
+ type: "regex";
389
+ pattern: string;
390
+ flags?: string | undefined;
391
+ } | {
392
+ value: string;
393
+ type: "fuzzy";
394
+ threshold?: number | undefined;
395
+ } | {
396
+ type: "llm_grader";
397
+ rubric: string;
398
+ provider?: "openai" | "azure-openai" | "vercel-ai" | "anthropic" | "google" | "mistral" | "cohere" | "huggingface" | "ollama" | "custom" | undefined;
399
+ threshold?: number | undefined;
400
+ model?: string | undefined;
401
+ } | {
402
+ values: string[];
403
+ type: "contains";
404
+ mode?: "all" | "any" | undefined;
405
+ } | {
406
+ values: string[];
407
+ type: "not_contains";
408
+ mode?: "all" | "any" | undefined;
409
+ } | {
410
+ type: "json_schema";
411
+ schema: Record<string, unknown>;
412
+ } | {
413
+ type: "custom";
414
+ evaluator: string;
415
+ config?: Record<string, unknown> | undefined;
416
+ } | {
417
+ value: string;
418
+ type: "similarity";
419
+ threshold?: number | undefined;
420
+ model?: string | undefined;
421
+ mode?: "embedding" | "llm" | undefined;
422
+ embeddingModel?: string | undefined;
423
+ } | {
424
+ type: "inline";
425
+ expression: string;
426
+ value?: string | undefined;
427
+ })[];
138
428
  }>]>;
139
429
  /**
140
430
  * Chat message schema
@@ -196,7 +486,7 @@ export declare const TestCaseSchema: z.ZodObject<{
196
486
  role: "system" | "user" | "assistant";
197
487
  content: string;
198
488
  }>, "many">]>;
199
- expected: z.ZodDiscriminatedUnion<"type", [z.ZodObject<{
489
+ expected: z.ZodUnion<[z.ZodDiscriminatedUnion<"type", [z.ZodObject<{
200
490
  type: z.ZodLiteral<"exact">;
201
491
  value: z.ZodString;
202
492
  caseSensitive: z.ZodDefault<z.ZodOptional<z.ZodBoolean>>;
@@ -262,6 +552,18 @@ export declare const TestCaseSchema: z.ZodObject<{
262
552
  values: string[];
263
553
  type: "contains";
264
554
  mode?: "all" | "any" | undefined;
555
+ }>, z.ZodObject<{
556
+ type: z.ZodLiteral<"not_contains">;
557
+ values: z.ZodArray<z.ZodString, "many">;
558
+ mode: z.ZodDefault<z.ZodEnum<["all", "any"]>>;
559
+ }, "strip", z.ZodTypeAny, {
560
+ values: string[];
561
+ type: "not_contains";
562
+ mode: "all" | "any";
563
+ }, {
564
+ values: string[];
565
+ type: "not_contains";
566
+ mode?: "all" | "any" | undefined;
265
567
  }>, z.ZodObject<{
266
568
  type: z.ZodLiteral<"json_schema">;
267
569
  schema: z.ZodRecord<z.ZodString, z.ZodUnknown>;
@@ -276,13 +578,284 @@ export declare const TestCaseSchema: z.ZodObject<{
276
578
  evaluator: z.ZodString;
277
579
  config: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
278
580
  }, "strip", z.ZodTypeAny, {
279
- type: "custom";
280
- evaluator: string;
281
- config?: Record<string, unknown> | undefined;
581
+ type: "custom";
582
+ evaluator: string;
583
+ config?: Record<string, unknown> | undefined;
584
+ }, {
585
+ type: "custom";
586
+ evaluator: string;
587
+ config?: Record<string, unknown> | undefined;
588
+ }>, z.ZodObject<{
589
+ type: z.ZodLiteral<"similarity">;
590
+ value: z.ZodString;
591
+ threshold: z.ZodDefault<z.ZodNumber>;
592
+ /** Mode for similarity evaluation: 'embedding' uses vector embeddings, 'llm' uses LLM-based comparison */
593
+ mode: z.ZodOptional<z.ZodEnum<["embedding", "llm"]>>;
594
+ /** Model for LLM-based similarity comparison (required when mode is 'llm') */
595
+ model: z.ZodOptional<z.ZodString>;
596
+ /** Embedding model to use for vector similarity (required when mode is 'embedding') */
597
+ embeddingModel: z.ZodOptional<z.ZodString>;
598
+ }, "strip", z.ZodTypeAny, {
599
+ value: string;
600
+ type: "similarity";
601
+ threshold: number;
602
+ model?: string | undefined;
603
+ mode?: "embedding" | "llm" | undefined;
604
+ embeddingModel?: string | undefined;
605
+ }, {
606
+ value: string;
607
+ type: "similarity";
608
+ threshold?: number | undefined;
609
+ model?: string | undefined;
610
+ mode?: "embedding" | "llm" | undefined;
611
+ embeddingModel?: string | undefined;
612
+ }>, z.ZodObject<{
613
+ type: z.ZodLiteral<"inline">;
614
+ expression: z.ZodString;
615
+ value: z.ZodOptional<z.ZodString>;
616
+ }, "strip", z.ZodTypeAny, {
617
+ type: "inline";
618
+ expression: string;
619
+ value?: string | undefined;
620
+ }, {
621
+ type: "inline";
622
+ expression: string;
623
+ value?: string | undefined;
624
+ }>]>, z.ZodObject<{
625
+ type: z.ZodLiteral<"combined">;
626
+ operator: z.ZodEnum<["and", "or"]>;
627
+ expectations: z.ZodArray<z.ZodDiscriminatedUnion<"type", [z.ZodObject<{
628
+ type: z.ZodLiteral<"exact">;
629
+ value: z.ZodString;
630
+ caseSensitive: z.ZodDefault<z.ZodOptional<z.ZodBoolean>>;
631
+ }, "strip", z.ZodTypeAny, {
632
+ value: string;
633
+ type: "exact";
634
+ caseSensitive: boolean;
635
+ }, {
636
+ value: string;
637
+ type: "exact";
638
+ caseSensitive?: boolean | undefined;
639
+ }>, z.ZodObject<{
640
+ type: z.ZodLiteral<"regex">;
641
+ pattern: z.ZodString;
642
+ flags: z.ZodOptional<z.ZodString>;
643
+ }, "strip", z.ZodTypeAny, {
644
+ type: "regex";
645
+ pattern: string;
646
+ flags?: string | undefined;
647
+ }, {
648
+ type: "regex";
649
+ pattern: string;
650
+ flags?: string | undefined;
651
+ }>, z.ZodObject<{
652
+ type: z.ZodLiteral<"fuzzy">;
653
+ value: z.ZodString;
654
+ threshold: z.ZodDefault<z.ZodNumber>;
655
+ }, "strip", z.ZodTypeAny, {
656
+ value: string;
657
+ type: "fuzzy";
658
+ threshold: number;
659
+ }, {
660
+ value: string;
661
+ type: "fuzzy";
662
+ threshold?: number | undefined;
663
+ }>, z.ZodObject<{
664
+ type: z.ZodLiteral<"llm_grader">;
665
+ rubric: z.ZodString;
666
+ model: z.ZodOptional<z.ZodString>;
667
+ provider: z.ZodOptional<z.ZodEnum<["openai", "azure-openai", "vercel-ai", "anthropic", "google", "mistral", "cohere", "huggingface", "ollama", "custom"]>>;
668
+ threshold: z.ZodDefault<z.ZodNumber>;
669
+ }, "strip", z.ZodTypeAny, {
670
+ type: "llm_grader";
671
+ threshold: number;
672
+ rubric: string;
673
+ provider?: "openai" | "azure-openai" | "vercel-ai" | "anthropic" | "google" | "mistral" | "cohere" | "huggingface" | "ollama" | "custom" | undefined;
674
+ model?: string | undefined;
675
+ }, {
676
+ type: "llm_grader";
677
+ rubric: string;
678
+ provider?: "openai" | "azure-openai" | "vercel-ai" | "anthropic" | "google" | "mistral" | "cohere" | "huggingface" | "ollama" | "custom" | undefined;
679
+ threshold?: number | undefined;
680
+ model?: string | undefined;
681
+ }>, z.ZodObject<{
682
+ type: z.ZodLiteral<"contains">;
683
+ values: z.ZodArray<z.ZodString, "many">;
684
+ mode: z.ZodDefault<z.ZodEnum<["all", "any"]>>;
685
+ }, "strip", z.ZodTypeAny, {
686
+ values: string[];
687
+ type: "contains";
688
+ mode: "all" | "any";
689
+ }, {
690
+ values: string[];
691
+ type: "contains";
692
+ mode?: "all" | "any" | undefined;
693
+ }>, z.ZodObject<{
694
+ type: z.ZodLiteral<"not_contains">;
695
+ values: z.ZodArray<z.ZodString, "many">;
696
+ mode: z.ZodDefault<z.ZodEnum<["all", "any"]>>;
697
+ }, "strip", z.ZodTypeAny, {
698
+ values: string[];
699
+ type: "not_contains";
700
+ mode: "all" | "any";
701
+ }, {
702
+ values: string[];
703
+ type: "not_contains";
704
+ mode?: "all" | "any" | undefined;
705
+ }>, z.ZodObject<{
706
+ type: z.ZodLiteral<"json_schema">;
707
+ schema: z.ZodRecord<z.ZodString, z.ZodUnknown>;
708
+ }, "strip", z.ZodTypeAny, {
709
+ type: "json_schema";
710
+ schema: Record<string, unknown>;
711
+ }, {
712
+ type: "json_schema";
713
+ schema: Record<string, unknown>;
714
+ }>, z.ZodObject<{
715
+ type: z.ZodLiteral<"custom">;
716
+ evaluator: z.ZodString;
717
+ config: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
718
+ }, "strip", z.ZodTypeAny, {
719
+ type: "custom";
720
+ evaluator: string;
721
+ config?: Record<string, unknown> | undefined;
722
+ }, {
723
+ type: "custom";
724
+ evaluator: string;
725
+ config?: Record<string, unknown> | undefined;
726
+ }>, z.ZodObject<{
727
+ type: z.ZodLiteral<"similarity">;
728
+ value: z.ZodString;
729
+ threshold: z.ZodDefault<z.ZodNumber>;
730
+ /** Mode for similarity evaluation: 'embedding' uses vector embeddings, 'llm' uses LLM-based comparison */
731
+ mode: z.ZodOptional<z.ZodEnum<["embedding", "llm"]>>;
732
+ /** Model for LLM-based similarity comparison (required when mode is 'llm') */
733
+ model: z.ZodOptional<z.ZodString>;
734
+ /** Embedding model to use for vector similarity (required when mode is 'embedding') */
735
+ embeddingModel: z.ZodOptional<z.ZodString>;
736
+ }, "strip", z.ZodTypeAny, {
737
+ value: string;
738
+ type: "similarity";
739
+ threshold: number;
740
+ model?: string | undefined;
741
+ mode?: "embedding" | "llm" | undefined;
742
+ embeddingModel?: string | undefined;
743
+ }, {
744
+ value: string;
745
+ type: "similarity";
746
+ threshold?: number | undefined;
747
+ model?: string | undefined;
748
+ mode?: "embedding" | "llm" | undefined;
749
+ embeddingModel?: string | undefined;
750
+ }>, z.ZodObject<{
751
+ type: z.ZodLiteral<"inline">;
752
+ expression: z.ZodString;
753
+ value: z.ZodOptional<z.ZodString>;
754
+ }, "strip", z.ZodTypeAny, {
755
+ type: "inline";
756
+ expression: string;
757
+ value?: string | undefined;
758
+ }, {
759
+ type: "inline";
760
+ expression: string;
761
+ value?: string | undefined;
762
+ }>]>, "many">;
763
+ }, "strip", z.ZodTypeAny, {
764
+ type: "combined";
765
+ operator: "and" | "or";
766
+ expectations: ({
767
+ value: string;
768
+ type: "exact";
769
+ caseSensitive: boolean;
770
+ } | {
771
+ type: "regex";
772
+ pattern: string;
773
+ flags?: string | undefined;
774
+ } | {
775
+ value: string;
776
+ type: "fuzzy";
777
+ threshold: number;
778
+ } | {
779
+ type: "llm_grader";
780
+ threshold: number;
781
+ rubric: string;
782
+ provider?: "openai" | "azure-openai" | "vercel-ai" | "anthropic" | "google" | "mistral" | "cohere" | "huggingface" | "ollama" | "custom" | undefined;
783
+ model?: string | undefined;
784
+ } | {
785
+ values: string[];
786
+ type: "contains";
787
+ mode: "all" | "any";
788
+ } | {
789
+ values: string[];
790
+ type: "not_contains";
791
+ mode: "all" | "any";
792
+ } | {
793
+ type: "json_schema";
794
+ schema: Record<string, unknown>;
795
+ } | {
796
+ type: "custom";
797
+ evaluator: string;
798
+ config?: Record<string, unknown> | undefined;
799
+ } | {
800
+ value: string;
801
+ type: "similarity";
802
+ threshold: number;
803
+ model?: string | undefined;
804
+ mode?: "embedding" | "llm" | undefined;
805
+ embeddingModel?: string | undefined;
806
+ } | {
807
+ type: "inline";
808
+ expression: string;
809
+ value?: string | undefined;
810
+ })[];
282
811
  }, {
283
- type: "custom";
284
- evaluator: string;
285
- config?: Record<string, unknown> | undefined;
812
+ type: "combined";
813
+ operator: "and" | "or";
814
+ expectations: ({
815
+ value: string;
816
+ type: "exact";
817
+ caseSensitive?: boolean | undefined;
818
+ } | {
819
+ type: "regex";
820
+ pattern: string;
821
+ flags?: string | undefined;
822
+ } | {
823
+ value: string;
824
+ type: "fuzzy";
825
+ threshold?: number | undefined;
826
+ } | {
827
+ type: "llm_grader";
828
+ rubric: string;
829
+ provider?: "openai" | "azure-openai" | "vercel-ai" | "anthropic" | "google" | "mistral" | "cohere" | "huggingface" | "ollama" | "custom" | undefined;
830
+ threshold?: number | undefined;
831
+ model?: string | undefined;
832
+ } | {
833
+ values: string[];
834
+ type: "contains";
835
+ mode?: "all" | "any" | undefined;
836
+ } | {
837
+ values: string[];
838
+ type: "not_contains";
839
+ mode?: "all" | "any" | undefined;
840
+ } | {
841
+ type: "json_schema";
842
+ schema: Record<string, unknown>;
843
+ } | {
844
+ type: "custom";
845
+ evaluator: string;
846
+ config?: Record<string, unknown> | undefined;
847
+ } | {
848
+ value: string;
849
+ type: "similarity";
850
+ threshold?: number | undefined;
851
+ model?: string | undefined;
852
+ mode?: "embedding" | "llm" | undefined;
853
+ embeddingModel?: string | undefined;
854
+ } | {
855
+ type: "inline";
856
+ expression: string;
857
+ value?: string | undefined;
858
+ })[];
286
859
  }>]>;
287
860
  tags: z.ZodDefault<z.ZodOptional<z.ZodArray<z.ZodString, "many">>>;
288
861
  metadata: z.ZodDefault<z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>>;
@@ -337,6 +910,10 @@ export declare const TestCaseSchema: z.ZodObject<{
337
910
  values: string[];
338
911
  type: "contains";
339
912
  mode: "all" | "any";
913
+ } | {
914
+ values: string[];
915
+ type: "not_contains";
916
+ mode: "all" | "any";
340
917
  } | {
341
918
  type: "json_schema";
342
919
  schema: Record<string, unknown>;
@@ -344,6 +921,65 @@ export declare const TestCaseSchema: z.ZodObject<{
344
921
  type: "custom";
345
922
  evaluator: string;
346
923
  config?: Record<string, unknown> | undefined;
924
+ } | {
925
+ value: string;
926
+ type: "similarity";
927
+ threshold: number;
928
+ model?: string | undefined;
929
+ mode?: "embedding" | "llm" | undefined;
930
+ embeddingModel?: string | undefined;
931
+ } | {
932
+ type: "inline";
933
+ expression: string;
934
+ value?: string | undefined;
935
+ } | {
936
+ type: "combined";
937
+ operator: "and" | "or";
938
+ expectations: ({
939
+ value: string;
940
+ type: "exact";
941
+ caseSensitive: boolean;
942
+ } | {
943
+ type: "regex";
944
+ pattern: string;
945
+ flags?: string | undefined;
946
+ } | {
947
+ value: string;
948
+ type: "fuzzy";
949
+ threshold: number;
950
+ } | {
951
+ type: "llm_grader";
952
+ threshold: number;
953
+ rubric: string;
954
+ provider?: "openai" | "azure-openai" | "vercel-ai" | "anthropic" | "google" | "mistral" | "cohere" | "huggingface" | "ollama" | "custom" | undefined;
955
+ model?: string | undefined;
956
+ } | {
957
+ values: string[];
958
+ type: "contains";
959
+ mode: "all" | "any";
960
+ } | {
961
+ values: string[];
962
+ type: "not_contains";
963
+ mode: "all" | "any";
964
+ } | {
965
+ type: "json_schema";
966
+ schema: Record<string, unknown>;
967
+ } | {
968
+ type: "custom";
969
+ evaluator: string;
970
+ config?: Record<string, unknown> | undefined;
971
+ } | {
972
+ value: string;
973
+ type: "similarity";
974
+ threshold: number;
975
+ model?: string | undefined;
976
+ mode?: "embedding" | "llm" | undefined;
977
+ embeddingModel?: string | undefined;
978
+ } | {
979
+ type: "inline";
980
+ expression: string;
981
+ value?: string | undefined;
982
+ })[];
347
983
  };
348
984
  id: string;
349
985
  prompt: string | {
@@ -390,6 +1026,10 @@ export declare const TestCaseSchema: z.ZodObject<{
390
1026
  values: string[];
391
1027
  type: "contains";
392
1028
  mode?: "all" | "any" | undefined;
1029
+ } | {
1030
+ values: string[];
1031
+ type: "not_contains";
1032
+ mode?: "all" | "any" | undefined;
393
1033
  } | {
394
1034
  type: "json_schema";
395
1035
  schema: Record<string, unknown>;
@@ -397,6 +1037,65 @@ export declare const TestCaseSchema: z.ZodObject<{
397
1037
  type: "custom";
398
1038
  evaluator: string;
399
1039
  config?: Record<string, unknown> | undefined;
1040
+ } | {
1041
+ value: string;
1042
+ type: "similarity";
1043
+ threshold?: number | undefined;
1044
+ model?: string | undefined;
1045
+ mode?: "embedding" | "llm" | undefined;
1046
+ embeddingModel?: string | undefined;
1047
+ } | {
1048
+ type: "inline";
1049
+ expression: string;
1050
+ value?: string | undefined;
1051
+ } | {
1052
+ type: "combined";
1053
+ operator: "and" | "or";
1054
+ expectations: ({
1055
+ value: string;
1056
+ type: "exact";
1057
+ caseSensitive?: boolean | undefined;
1058
+ } | {
1059
+ type: "regex";
1060
+ pattern: string;
1061
+ flags?: string | undefined;
1062
+ } | {
1063
+ value: string;
1064
+ type: "fuzzy";
1065
+ threshold?: number | undefined;
1066
+ } | {
1067
+ type: "llm_grader";
1068
+ rubric: string;
1069
+ provider?: "openai" | "azure-openai" | "vercel-ai" | "anthropic" | "google" | "mistral" | "cohere" | "huggingface" | "ollama" | "custom" | undefined;
1070
+ threshold?: number | undefined;
1071
+ model?: string | undefined;
1072
+ } | {
1073
+ values: string[];
1074
+ type: "contains";
1075
+ mode?: "all" | "any" | undefined;
1076
+ } | {
1077
+ values: string[];
1078
+ type: "not_contains";
1079
+ mode?: "all" | "any" | undefined;
1080
+ } | {
1081
+ type: "json_schema";
1082
+ schema: Record<string, unknown>;
1083
+ } | {
1084
+ type: "custom";
1085
+ evaluator: string;
1086
+ config?: Record<string, unknown> | undefined;
1087
+ } | {
1088
+ value: string;
1089
+ type: "similarity";
1090
+ threshold?: number | undefined;
1091
+ model?: string | undefined;
1092
+ mode?: "embedding" | "llm" | undefined;
1093
+ embeddingModel?: string | undefined;
1094
+ } | {
1095
+ type: "inline";
1096
+ expression: string;
1097
+ value?: string | undefined;
1098
+ })[];
400
1099
  };
401
1100
  id: string;
402
1101
  prompt: string | {
@@ -440,6 +1139,8 @@ export declare const ScenarioSchema: z.ZodObject<{
440
1139
  resourceName: z.ZodOptional<z.ZodString>;
441
1140
  deploymentName: z.ZodOptional<z.ZodString>;
442
1141
  apiVersion: z.ZodOptional<z.ZodString>;
1142
+ embeddingDeploymentName: z.ZodOptional<z.ZodString>;
1143
+ modelFamily: z.ZodOptional<z.ZodString>;
443
1144
  underlyingProvider: z.ZodOptional<z.ZodEnum<["openai", "azure", "anthropic", "google", "mistral"]>>;
444
1145
  }, "strip", z.ZodTypeAny, {
445
1146
  apiKey?: string | undefined;
@@ -451,6 +1152,8 @@ export declare const ScenarioSchema: z.ZodObject<{
451
1152
  resourceName?: string | undefined;
452
1153
  deploymentName?: string | undefined;
453
1154
  apiVersion?: string | undefined;
1155
+ embeddingDeploymentName?: string | undefined;
1156
+ modelFamily?: string | undefined;
454
1157
  underlyingProvider?: "openai" | "anthropic" | "google" | "mistral" | "azure" | undefined;
455
1158
  }, {
456
1159
  apiKey?: string | undefined;
@@ -462,6 +1165,8 @@ export declare const ScenarioSchema: z.ZodObject<{
462
1165
  resourceName?: string | undefined;
463
1166
  deploymentName?: string | undefined;
464
1167
  apiVersion?: string | undefined;
1168
+ embeddingDeploymentName?: string | undefined;
1169
+ modelFamily?: string | undefined;
465
1170
  underlyingProvider?: "openai" | "anthropic" | "google" | "mistral" | "azure" | undefined;
466
1171
  }>>;
467
1172
  seed: z.ZodOptional<z.ZodNumber>;
@@ -516,7 +1221,7 @@ export declare const ScenarioSchema: z.ZodObject<{
516
1221
  role: "system" | "user" | "assistant";
517
1222
  content: string;
518
1223
  }>, "many">]>;
519
- expected: z.ZodDiscriminatedUnion<"type", [z.ZodObject<{
1224
+ expected: z.ZodUnion<[z.ZodDiscriminatedUnion<"type", [z.ZodObject<{
520
1225
  type: z.ZodLiteral<"exact">;
521
1226
  value: z.ZodString;
522
1227
  caseSensitive: z.ZodDefault<z.ZodOptional<z.ZodBoolean>>;
@@ -582,6 +1287,18 @@ export declare const ScenarioSchema: z.ZodObject<{
582
1287
  values: string[];
583
1288
  type: "contains";
584
1289
  mode?: "all" | "any" | undefined;
1290
+ }>, z.ZodObject<{
1291
+ type: z.ZodLiteral<"not_contains">;
1292
+ values: z.ZodArray<z.ZodString, "many">;
1293
+ mode: z.ZodDefault<z.ZodEnum<["all", "any"]>>;
1294
+ }, "strip", z.ZodTypeAny, {
1295
+ values: string[];
1296
+ type: "not_contains";
1297
+ mode: "all" | "any";
1298
+ }, {
1299
+ values: string[];
1300
+ type: "not_contains";
1301
+ mode?: "all" | "any" | undefined;
585
1302
  }>, z.ZodObject<{
586
1303
  type: z.ZodLiteral<"json_schema">;
587
1304
  schema: z.ZodRecord<z.ZodString, z.ZodUnknown>;
@@ -603,6 +1320,277 @@ export declare const ScenarioSchema: z.ZodObject<{
603
1320
  type: "custom";
604
1321
  evaluator: string;
605
1322
  config?: Record<string, unknown> | undefined;
1323
+ }>, z.ZodObject<{
1324
+ type: z.ZodLiteral<"similarity">;
1325
+ value: z.ZodString;
1326
+ threshold: z.ZodDefault<z.ZodNumber>;
1327
+ /** Mode for similarity evaluation: 'embedding' uses vector embeddings, 'llm' uses LLM-based comparison */
1328
+ mode: z.ZodOptional<z.ZodEnum<["embedding", "llm"]>>;
1329
+ /** Model for LLM-based similarity comparison (required when mode is 'llm') */
1330
+ model: z.ZodOptional<z.ZodString>;
1331
+ /** Embedding model to use for vector similarity (required when mode is 'embedding') */
1332
+ embeddingModel: z.ZodOptional<z.ZodString>;
1333
+ }, "strip", z.ZodTypeAny, {
1334
+ value: string;
1335
+ type: "similarity";
1336
+ threshold: number;
1337
+ model?: string | undefined;
1338
+ mode?: "embedding" | "llm" | undefined;
1339
+ embeddingModel?: string | undefined;
1340
+ }, {
1341
+ value: string;
1342
+ type: "similarity";
1343
+ threshold?: number | undefined;
1344
+ model?: string | undefined;
1345
+ mode?: "embedding" | "llm" | undefined;
1346
+ embeddingModel?: string | undefined;
1347
+ }>, z.ZodObject<{
1348
+ type: z.ZodLiteral<"inline">;
1349
+ expression: z.ZodString;
1350
+ value: z.ZodOptional<z.ZodString>;
1351
+ }, "strip", z.ZodTypeAny, {
1352
+ type: "inline";
1353
+ expression: string;
1354
+ value?: string | undefined;
1355
+ }, {
1356
+ type: "inline";
1357
+ expression: string;
1358
+ value?: string | undefined;
1359
+ }>]>, z.ZodObject<{
1360
+ type: z.ZodLiteral<"combined">;
1361
+ operator: z.ZodEnum<["and", "or"]>;
1362
+ expectations: z.ZodArray<z.ZodDiscriminatedUnion<"type", [z.ZodObject<{
1363
+ type: z.ZodLiteral<"exact">;
1364
+ value: z.ZodString;
1365
+ caseSensitive: z.ZodDefault<z.ZodOptional<z.ZodBoolean>>;
1366
+ }, "strip", z.ZodTypeAny, {
1367
+ value: string;
1368
+ type: "exact";
1369
+ caseSensitive: boolean;
1370
+ }, {
1371
+ value: string;
1372
+ type: "exact";
1373
+ caseSensitive?: boolean | undefined;
1374
+ }>, z.ZodObject<{
1375
+ type: z.ZodLiteral<"regex">;
1376
+ pattern: z.ZodString;
1377
+ flags: z.ZodOptional<z.ZodString>;
1378
+ }, "strip", z.ZodTypeAny, {
1379
+ type: "regex";
1380
+ pattern: string;
1381
+ flags?: string | undefined;
1382
+ }, {
1383
+ type: "regex";
1384
+ pattern: string;
1385
+ flags?: string | undefined;
1386
+ }>, z.ZodObject<{
1387
+ type: z.ZodLiteral<"fuzzy">;
1388
+ value: z.ZodString;
1389
+ threshold: z.ZodDefault<z.ZodNumber>;
1390
+ }, "strip", z.ZodTypeAny, {
1391
+ value: string;
1392
+ type: "fuzzy";
1393
+ threshold: number;
1394
+ }, {
1395
+ value: string;
1396
+ type: "fuzzy";
1397
+ threshold?: number | undefined;
1398
+ }>, z.ZodObject<{
1399
+ type: z.ZodLiteral<"llm_grader">;
1400
+ rubric: z.ZodString;
1401
+ model: z.ZodOptional<z.ZodString>;
1402
+ provider: z.ZodOptional<z.ZodEnum<["openai", "azure-openai", "vercel-ai", "anthropic", "google", "mistral", "cohere", "huggingface", "ollama", "custom"]>>;
1403
+ threshold: z.ZodDefault<z.ZodNumber>;
1404
+ }, "strip", z.ZodTypeAny, {
1405
+ type: "llm_grader";
1406
+ threshold: number;
1407
+ rubric: string;
1408
+ provider?: "openai" | "azure-openai" | "vercel-ai" | "anthropic" | "google" | "mistral" | "cohere" | "huggingface" | "ollama" | "custom" | undefined;
1409
+ model?: string | undefined;
1410
+ }, {
1411
+ type: "llm_grader";
1412
+ rubric: string;
1413
+ provider?: "openai" | "azure-openai" | "vercel-ai" | "anthropic" | "google" | "mistral" | "cohere" | "huggingface" | "ollama" | "custom" | undefined;
1414
+ threshold?: number | undefined;
1415
+ model?: string | undefined;
1416
+ }>, z.ZodObject<{
1417
+ type: z.ZodLiteral<"contains">;
1418
+ values: z.ZodArray<z.ZodString, "many">;
1419
+ mode: z.ZodDefault<z.ZodEnum<["all", "any"]>>;
1420
+ }, "strip", z.ZodTypeAny, {
1421
+ values: string[];
1422
+ type: "contains";
1423
+ mode: "all" | "any";
1424
+ }, {
1425
+ values: string[];
1426
+ type: "contains";
1427
+ mode?: "all" | "any" | undefined;
1428
+ }>, z.ZodObject<{
1429
+ type: z.ZodLiteral<"not_contains">;
1430
+ values: z.ZodArray<z.ZodString, "many">;
1431
+ mode: z.ZodDefault<z.ZodEnum<["all", "any"]>>;
1432
+ }, "strip", z.ZodTypeAny, {
1433
+ values: string[];
1434
+ type: "not_contains";
1435
+ mode: "all" | "any";
1436
+ }, {
1437
+ values: string[];
1438
+ type: "not_contains";
1439
+ mode?: "all" | "any" | undefined;
1440
+ }>, z.ZodObject<{
1441
+ type: z.ZodLiteral<"json_schema">;
1442
+ schema: z.ZodRecord<z.ZodString, z.ZodUnknown>;
1443
+ }, "strip", z.ZodTypeAny, {
1444
+ type: "json_schema";
1445
+ schema: Record<string, unknown>;
1446
+ }, {
1447
+ type: "json_schema";
1448
+ schema: Record<string, unknown>;
1449
+ }>, z.ZodObject<{
1450
+ type: z.ZodLiteral<"custom">;
1451
+ evaluator: z.ZodString;
1452
+ config: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
1453
+ }, "strip", z.ZodTypeAny, {
1454
+ type: "custom";
1455
+ evaluator: string;
1456
+ config?: Record<string, unknown> | undefined;
1457
+ }, {
1458
+ type: "custom";
1459
+ evaluator: string;
1460
+ config?: Record<string, unknown> | undefined;
1461
+ }>, z.ZodObject<{
1462
+ type: z.ZodLiteral<"similarity">;
1463
+ value: z.ZodString;
1464
+ threshold: z.ZodDefault<z.ZodNumber>;
1465
+ /** Mode for similarity evaluation: 'embedding' uses vector embeddings, 'llm' uses LLM-based comparison */
1466
+ mode: z.ZodOptional<z.ZodEnum<["embedding", "llm"]>>;
1467
+ /** Model for LLM-based similarity comparison (required when mode is 'llm') */
1468
+ model: z.ZodOptional<z.ZodString>;
1469
+ /** Embedding model to use for vector similarity (required when mode is 'embedding') */
1470
+ embeddingModel: z.ZodOptional<z.ZodString>;
1471
+ }, "strip", z.ZodTypeAny, {
1472
+ value: string;
1473
+ type: "similarity";
1474
+ threshold: number;
1475
+ model?: string | undefined;
1476
+ mode?: "embedding" | "llm" | undefined;
1477
+ embeddingModel?: string | undefined;
1478
+ }, {
1479
+ value: string;
1480
+ type: "similarity";
1481
+ threshold?: number | undefined;
1482
+ model?: string | undefined;
1483
+ mode?: "embedding" | "llm" | undefined;
1484
+ embeddingModel?: string | undefined;
1485
+ }>, z.ZodObject<{
1486
+ type: z.ZodLiteral<"inline">;
1487
+ expression: z.ZodString;
1488
+ value: z.ZodOptional<z.ZodString>;
1489
+ }, "strip", z.ZodTypeAny, {
1490
+ type: "inline";
1491
+ expression: string;
1492
+ value?: string | undefined;
1493
+ }, {
1494
+ type: "inline";
1495
+ expression: string;
1496
+ value?: string | undefined;
1497
+ }>]>, "many">;
1498
+ }, "strip", z.ZodTypeAny, {
1499
+ type: "combined";
1500
+ operator: "and" | "or";
1501
+ expectations: ({
1502
+ value: string;
1503
+ type: "exact";
1504
+ caseSensitive: boolean;
1505
+ } | {
1506
+ type: "regex";
1507
+ pattern: string;
1508
+ flags?: string | undefined;
1509
+ } | {
1510
+ value: string;
1511
+ type: "fuzzy";
1512
+ threshold: number;
1513
+ } | {
1514
+ type: "llm_grader";
1515
+ threshold: number;
1516
+ rubric: string;
1517
+ provider?: "openai" | "azure-openai" | "vercel-ai" | "anthropic" | "google" | "mistral" | "cohere" | "huggingface" | "ollama" | "custom" | undefined;
1518
+ model?: string | undefined;
1519
+ } | {
1520
+ values: string[];
1521
+ type: "contains";
1522
+ mode: "all" | "any";
1523
+ } | {
1524
+ values: string[];
1525
+ type: "not_contains";
1526
+ mode: "all" | "any";
1527
+ } | {
1528
+ type: "json_schema";
1529
+ schema: Record<string, unknown>;
1530
+ } | {
1531
+ type: "custom";
1532
+ evaluator: string;
1533
+ config?: Record<string, unknown> | undefined;
1534
+ } | {
1535
+ value: string;
1536
+ type: "similarity";
1537
+ threshold: number;
1538
+ model?: string | undefined;
1539
+ mode?: "embedding" | "llm" | undefined;
1540
+ embeddingModel?: string | undefined;
1541
+ } | {
1542
+ type: "inline";
1543
+ expression: string;
1544
+ value?: string | undefined;
1545
+ })[];
1546
+ }, {
1547
+ type: "combined";
1548
+ operator: "and" | "or";
1549
+ expectations: ({
1550
+ value: string;
1551
+ type: "exact";
1552
+ caseSensitive?: boolean | undefined;
1553
+ } | {
1554
+ type: "regex";
1555
+ pattern: string;
1556
+ flags?: string | undefined;
1557
+ } | {
1558
+ value: string;
1559
+ type: "fuzzy";
1560
+ threshold?: number | undefined;
1561
+ } | {
1562
+ type: "llm_grader";
1563
+ rubric: string;
1564
+ provider?: "openai" | "azure-openai" | "vercel-ai" | "anthropic" | "google" | "mistral" | "cohere" | "huggingface" | "ollama" | "custom" | undefined;
1565
+ threshold?: number | undefined;
1566
+ model?: string | undefined;
1567
+ } | {
1568
+ values: string[];
1569
+ type: "contains";
1570
+ mode?: "all" | "any" | undefined;
1571
+ } | {
1572
+ values: string[];
1573
+ type: "not_contains";
1574
+ mode?: "all" | "any" | undefined;
1575
+ } | {
1576
+ type: "json_schema";
1577
+ schema: Record<string, unknown>;
1578
+ } | {
1579
+ type: "custom";
1580
+ evaluator: string;
1581
+ config?: Record<string, unknown> | undefined;
1582
+ } | {
1583
+ value: string;
1584
+ type: "similarity";
1585
+ threshold?: number | undefined;
1586
+ model?: string | undefined;
1587
+ mode?: "embedding" | "llm" | undefined;
1588
+ embeddingModel?: string | undefined;
1589
+ } | {
1590
+ type: "inline";
1591
+ expression: string;
1592
+ value?: string | undefined;
1593
+ })[];
606
1594
  }>]>;
607
1595
  tags: z.ZodDefault<z.ZodOptional<z.ZodArray<z.ZodString, "many">>>;
608
1596
  metadata: z.ZodDefault<z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>>;
@@ -657,6 +1645,10 @@ export declare const ScenarioSchema: z.ZodObject<{
657
1645
  values: string[];
658
1646
  type: "contains";
659
1647
  mode: "all" | "any";
1648
+ } | {
1649
+ values: string[];
1650
+ type: "not_contains";
1651
+ mode: "all" | "any";
660
1652
  } | {
661
1653
  type: "json_schema";
662
1654
  schema: Record<string, unknown>;
@@ -664,6 +1656,65 @@ export declare const ScenarioSchema: z.ZodObject<{
664
1656
  type: "custom";
665
1657
  evaluator: string;
666
1658
  config?: Record<string, unknown> | undefined;
1659
+ } | {
1660
+ value: string;
1661
+ type: "similarity";
1662
+ threshold: number;
1663
+ model?: string | undefined;
1664
+ mode?: "embedding" | "llm" | undefined;
1665
+ embeddingModel?: string | undefined;
1666
+ } | {
1667
+ type: "inline";
1668
+ expression: string;
1669
+ value?: string | undefined;
1670
+ } | {
1671
+ type: "combined";
1672
+ operator: "and" | "or";
1673
+ expectations: ({
1674
+ value: string;
1675
+ type: "exact";
1676
+ caseSensitive: boolean;
1677
+ } | {
1678
+ type: "regex";
1679
+ pattern: string;
1680
+ flags?: string | undefined;
1681
+ } | {
1682
+ value: string;
1683
+ type: "fuzzy";
1684
+ threshold: number;
1685
+ } | {
1686
+ type: "llm_grader";
1687
+ threshold: number;
1688
+ rubric: string;
1689
+ provider?: "openai" | "azure-openai" | "vercel-ai" | "anthropic" | "google" | "mistral" | "cohere" | "huggingface" | "ollama" | "custom" | undefined;
1690
+ model?: string | undefined;
1691
+ } | {
1692
+ values: string[];
1693
+ type: "contains";
1694
+ mode: "all" | "any";
1695
+ } | {
1696
+ values: string[];
1697
+ type: "not_contains";
1698
+ mode: "all" | "any";
1699
+ } | {
1700
+ type: "json_schema";
1701
+ schema: Record<string, unknown>;
1702
+ } | {
1703
+ type: "custom";
1704
+ evaluator: string;
1705
+ config?: Record<string, unknown> | undefined;
1706
+ } | {
1707
+ value: string;
1708
+ type: "similarity";
1709
+ threshold: number;
1710
+ model?: string | undefined;
1711
+ mode?: "embedding" | "llm" | undefined;
1712
+ embeddingModel?: string | undefined;
1713
+ } | {
1714
+ type: "inline";
1715
+ expression: string;
1716
+ value?: string | undefined;
1717
+ })[];
667
1718
  };
668
1719
  id: string;
669
1720
  prompt: string | {
@@ -710,6 +1761,10 @@ export declare const ScenarioSchema: z.ZodObject<{
710
1761
  values: string[];
711
1762
  type: "contains";
712
1763
  mode?: "all" | "any" | undefined;
1764
+ } | {
1765
+ values: string[];
1766
+ type: "not_contains";
1767
+ mode?: "all" | "any" | undefined;
713
1768
  } | {
714
1769
  type: "json_schema";
715
1770
  schema: Record<string, unknown>;
@@ -717,6 +1772,65 @@ export declare const ScenarioSchema: z.ZodObject<{
717
1772
  type: "custom";
718
1773
  evaluator: string;
719
1774
  config?: Record<string, unknown> | undefined;
1775
+ } | {
1776
+ value: string;
1777
+ type: "similarity";
1778
+ threshold?: number | undefined;
1779
+ model?: string | undefined;
1780
+ mode?: "embedding" | "llm" | undefined;
1781
+ embeddingModel?: string | undefined;
1782
+ } | {
1783
+ type: "inline";
1784
+ expression: string;
1785
+ value?: string | undefined;
1786
+ } | {
1787
+ type: "combined";
1788
+ operator: "and" | "or";
1789
+ expectations: ({
1790
+ value: string;
1791
+ type: "exact";
1792
+ caseSensitive?: boolean | undefined;
1793
+ } | {
1794
+ type: "regex";
1795
+ pattern: string;
1796
+ flags?: string | undefined;
1797
+ } | {
1798
+ value: string;
1799
+ type: "fuzzy";
1800
+ threshold?: number | undefined;
1801
+ } | {
1802
+ type: "llm_grader";
1803
+ rubric: string;
1804
+ provider?: "openai" | "azure-openai" | "vercel-ai" | "anthropic" | "google" | "mistral" | "cohere" | "huggingface" | "ollama" | "custom" | undefined;
1805
+ threshold?: number | undefined;
1806
+ model?: string | undefined;
1807
+ } | {
1808
+ values: string[];
1809
+ type: "contains";
1810
+ mode?: "all" | "any" | undefined;
1811
+ } | {
1812
+ values: string[];
1813
+ type: "not_contains";
1814
+ mode?: "all" | "any" | undefined;
1815
+ } | {
1816
+ type: "json_schema";
1817
+ schema: Record<string, unknown>;
1818
+ } | {
1819
+ type: "custom";
1820
+ evaluator: string;
1821
+ config?: Record<string, unknown> | undefined;
1822
+ } | {
1823
+ value: string;
1824
+ type: "similarity";
1825
+ threshold?: number | undefined;
1826
+ model?: string | undefined;
1827
+ mode?: "embedding" | "llm" | undefined;
1828
+ embeddingModel?: string | undefined;
1829
+ } | {
1830
+ type: "inline";
1831
+ expression: string;
1832
+ value?: string | undefined;
1833
+ })[];
720
1834
  };
721
1835
  id: string;
722
1836
  prompt: string | {
@@ -775,6 +1889,10 @@ export declare const ScenarioSchema: z.ZodObject<{
775
1889
  values: string[];
776
1890
  type: "contains";
777
1891
  mode: "all" | "any";
1892
+ } | {
1893
+ values: string[];
1894
+ type: "not_contains";
1895
+ mode: "all" | "any";
778
1896
  } | {
779
1897
  type: "json_schema";
780
1898
  schema: Record<string, unknown>;
@@ -782,6 +1900,65 @@ export declare const ScenarioSchema: z.ZodObject<{
782
1900
  type: "custom";
783
1901
  evaluator: string;
784
1902
  config?: Record<string, unknown> | undefined;
1903
+ } | {
1904
+ value: string;
1905
+ type: "similarity";
1906
+ threshold: number;
1907
+ model?: string | undefined;
1908
+ mode?: "embedding" | "llm" | undefined;
1909
+ embeddingModel?: string | undefined;
1910
+ } | {
1911
+ type: "inline";
1912
+ expression: string;
1913
+ value?: string | undefined;
1914
+ } | {
1915
+ type: "combined";
1916
+ operator: "and" | "or";
1917
+ expectations: ({
1918
+ value: string;
1919
+ type: "exact";
1920
+ caseSensitive: boolean;
1921
+ } | {
1922
+ type: "regex";
1923
+ pattern: string;
1924
+ flags?: string | undefined;
1925
+ } | {
1926
+ value: string;
1927
+ type: "fuzzy";
1928
+ threshold: number;
1929
+ } | {
1930
+ type: "llm_grader";
1931
+ threshold: number;
1932
+ rubric: string;
1933
+ provider?: "openai" | "azure-openai" | "vercel-ai" | "anthropic" | "google" | "mistral" | "cohere" | "huggingface" | "ollama" | "custom" | undefined;
1934
+ model?: string | undefined;
1935
+ } | {
1936
+ values: string[];
1937
+ type: "contains";
1938
+ mode: "all" | "any";
1939
+ } | {
1940
+ values: string[];
1941
+ type: "not_contains";
1942
+ mode: "all" | "any";
1943
+ } | {
1944
+ type: "json_schema";
1945
+ schema: Record<string, unknown>;
1946
+ } | {
1947
+ type: "custom";
1948
+ evaluator: string;
1949
+ config?: Record<string, unknown> | undefined;
1950
+ } | {
1951
+ value: string;
1952
+ type: "similarity";
1953
+ threshold: number;
1954
+ model?: string | undefined;
1955
+ mode?: "embedding" | "llm" | undefined;
1956
+ embeddingModel?: string | undefined;
1957
+ } | {
1958
+ type: "inline";
1959
+ expression: string;
1960
+ value?: string | undefined;
1961
+ })[];
785
1962
  };
786
1963
  id: string;
787
1964
  prompt: string | {
@@ -828,6 +2005,8 @@ export declare const ScenarioSchema: z.ZodObject<{
828
2005
  resourceName?: string | undefined;
829
2006
  deploymentName?: string | undefined;
830
2007
  apiVersion?: string | undefined;
2008
+ embeddingDeploymentName?: string | undefined;
2009
+ modelFamily?: string | undefined;
831
2010
  underlyingProvider?: "openai" | "anthropic" | "google" | "mistral" | "azure" | undefined;
832
2011
  } | undefined;
833
2012
  seed?: number | undefined;
@@ -865,6 +2044,10 @@ export declare const ScenarioSchema: z.ZodObject<{
865
2044
  values: string[];
866
2045
  type: "contains";
867
2046
  mode?: "all" | "any" | undefined;
2047
+ } | {
2048
+ values: string[];
2049
+ type: "not_contains";
2050
+ mode?: "all" | "any" | undefined;
868
2051
  } | {
869
2052
  type: "json_schema";
870
2053
  schema: Record<string, unknown>;
@@ -872,6 +2055,65 @@ export declare const ScenarioSchema: z.ZodObject<{
872
2055
  type: "custom";
873
2056
  evaluator: string;
874
2057
  config?: Record<string, unknown> | undefined;
2058
+ } | {
2059
+ value: string;
2060
+ type: "similarity";
2061
+ threshold?: number | undefined;
2062
+ model?: string | undefined;
2063
+ mode?: "embedding" | "llm" | undefined;
2064
+ embeddingModel?: string | undefined;
2065
+ } | {
2066
+ type: "inline";
2067
+ expression: string;
2068
+ value?: string | undefined;
2069
+ } | {
2070
+ type: "combined";
2071
+ operator: "and" | "or";
2072
+ expectations: ({
2073
+ value: string;
2074
+ type: "exact";
2075
+ caseSensitive?: boolean | undefined;
2076
+ } | {
2077
+ type: "regex";
2078
+ pattern: string;
2079
+ flags?: string | undefined;
2080
+ } | {
2081
+ value: string;
2082
+ type: "fuzzy";
2083
+ threshold?: number | undefined;
2084
+ } | {
2085
+ type: "llm_grader";
2086
+ rubric: string;
2087
+ provider?: "openai" | "azure-openai" | "vercel-ai" | "anthropic" | "google" | "mistral" | "cohere" | "huggingface" | "ollama" | "custom" | undefined;
2088
+ threshold?: number | undefined;
2089
+ model?: string | undefined;
2090
+ } | {
2091
+ values: string[];
2092
+ type: "contains";
2093
+ mode?: "all" | "any" | undefined;
2094
+ } | {
2095
+ values: string[];
2096
+ type: "not_contains";
2097
+ mode?: "all" | "any" | undefined;
2098
+ } | {
2099
+ type: "json_schema";
2100
+ schema: Record<string, unknown>;
2101
+ } | {
2102
+ type: "custom";
2103
+ evaluator: string;
2104
+ config?: Record<string, unknown> | undefined;
2105
+ } | {
2106
+ value: string;
2107
+ type: "similarity";
2108
+ threshold?: number | undefined;
2109
+ model?: string | undefined;
2110
+ mode?: "embedding" | "llm" | undefined;
2111
+ embeddingModel?: string | undefined;
2112
+ } | {
2113
+ type: "inline";
2114
+ expression: string;
2115
+ value?: string | undefined;
2116
+ })[];
875
2117
  };
876
2118
  id: string;
877
2119
  prompt: string | {
@@ -920,6 +2162,8 @@ export declare const ScenarioSchema: z.ZodObject<{
920
2162
  resourceName?: string | undefined;
921
2163
  deploymentName?: string | undefined;
922
2164
  apiVersion?: string | undefined;
2165
+ embeddingDeploymentName?: string | undefined;
2166
+ modelFamily?: string | undefined;
923
2167
  underlyingProvider?: "openai" | "anthropic" | "google" | "mistral" | "azure" | undefined;
924
2168
  } | undefined;
925
2169
  seed?: number | undefined;