@artemiskit/core 0.1.6 → 0.2.0

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