localarena 0.1.0 → 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.
@@ -0,0 +1,1422 @@
1
+ {
2
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
3
+ "$id": "https://github.com/maziyarpanahi/localarena/blob/main/schema/localarena-evaluation-run-v1.schema.json",
4
+ "title": "LocalArena evaluation run v1",
5
+ "description": "The structural JSON contract for a live LocalArena model-by-task evaluation result. SDK loaders additionally enforce the cross-field matrix invariants declared below.",
6
+ "x-localarena-semantic-invariants": [
7
+ "Every configured model, task, and repetition combination has exactly one record.",
8
+ "Repetition numbers are contiguous and start at one.",
9
+ "Record target, provider, model, and task identifiers match their configured descriptors."
10
+ ],
11
+ "type": "object",
12
+ "additionalProperties": false,
13
+ "required": [
14
+ "schema_version",
15
+ "id",
16
+ "name",
17
+ "started_at",
18
+ "finished_at",
19
+ "include_content",
20
+ "models",
21
+ "tasks",
22
+ "records",
23
+ "summary",
24
+ "arena"
25
+ ],
26
+ "properties": {
27
+ "schema_version": {
28
+ "const": 1
29
+ },
30
+ "id": {
31
+ "$ref": "#/$defs/nonEmptyString"
32
+ },
33
+ "name": {
34
+ "$ref": "#/$defs/nonEmptyString"
35
+ },
36
+ "started_at": {
37
+ "$ref": "#/$defs/timestamp"
38
+ },
39
+ "finished_at": {
40
+ "$ref": "#/$defs/timestamp"
41
+ },
42
+ "include_content": {
43
+ "type": "boolean",
44
+ "default": false,
45
+ "description": "Whether task, generation, score, and error content was retained."
46
+ },
47
+ "models": {
48
+ "type": "array",
49
+ "minItems": 1,
50
+ "items": {
51
+ "$ref": "#/$defs/modelTarget"
52
+ }
53
+ },
54
+ "tasks": {
55
+ "type": "array",
56
+ "minItems": 1,
57
+ "items": {
58
+ "$ref": "#/$defs/task"
59
+ }
60
+ },
61
+ "records": {
62
+ "type": "array",
63
+ "minItems": 1,
64
+ "items": {
65
+ "$ref": "#/$defs/record"
66
+ }
67
+ },
68
+ "summary": {
69
+ "type": "array",
70
+ "minItems": 1,
71
+ "items": {
72
+ "$ref": "#/$defs/summaryRow"
73
+ }
74
+ },
75
+ "arena": {
76
+ "$ref": "#/$defs/arena"
77
+ }
78
+ },
79
+ "allOf": [
80
+ {
81
+ "if": {
82
+ "properties": {
83
+ "include_content": {
84
+ "const": true
85
+ }
86
+ }
87
+ },
88
+ "then": {
89
+ "properties": {
90
+ "tasks": {
91
+ "items": {
92
+ "$ref": "#/$defs/taskWithContent"
93
+ }
94
+ },
95
+ "records": {
96
+ "items": {
97
+ "$ref": "#/$defs/recordWithContent"
98
+ }
99
+ }
100
+ }
101
+ }
102
+ },
103
+ {
104
+ "if": {
105
+ "properties": {
106
+ "include_content": {
107
+ "const": false
108
+ }
109
+ }
110
+ },
111
+ "then": {
112
+ "properties": {
113
+ "tasks": {
114
+ "items": {
115
+ "$ref": "#/$defs/taskWithoutContent"
116
+ }
117
+ },
118
+ "records": {
119
+ "items": {
120
+ "$ref": "#/$defs/recordWithoutContent"
121
+ }
122
+ }
123
+ }
124
+ }
125
+ }
126
+ ],
127
+ "$defs": {
128
+ "nonEmptyString": {
129
+ "type": "string",
130
+ "minLength": 1,
131
+ "pattern": "\\S"
132
+ },
133
+ "timestamp": {
134
+ "type": "string",
135
+ "format": "date-time"
136
+ },
137
+ "safeInteger": {
138
+ "type": "integer",
139
+ "minimum": -9007199254740991,
140
+ "maximum": 9007199254740991
141
+ },
142
+ "nonNegativeSafeInteger": {
143
+ "type": "integer",
144
+ "minimum": 0,
145
+ "maximum": 9007199254740991
146
+ },
147
+ "optionalNonNegativeSafeInteger": {
148
+ "oneOf": [
149
+ {
150
+ "$ref": "#/$defs/nonNegativeSafeInteger"
151
+ },
152
+ {
153
+ "type": "null"
154
+ }
155
+ ]
156
+ },
157
+ "providerName": {
158
+ "$ref": "#/$defs/nonEmptyString"
159
+ },
160
+ "message": {
161
+ "type": "object",
162
+ "additionalProperties": false,
163
+ "required": [
164
+ "role",
165
+ "content"
166
+ ],
167
+ "properties": {
168
+ "role": {
169
+ "enum": [
170
+ "system",
171
+ "user",
172
+ "assistant"
173
+ ]
174
+ },
175
+ "content": {
176
+ "type": [
177
+ "string",
178
+ "null"
179
+ ]
180
+ }
181
+ }
182
+ },
183
+ "messageWithContent": {
184
+ "allOf": [
185
+ {
186
+ "$ref": "#/$defs/message"
187
+ },
188
+ {
189
+ "properties": {
190
+ "content": {
191
+ "type": "string"
192
+ }
193
+ }
194
+ }
195
+ ]
196
+ },
197
+ "messageWithoutContent": {
198
+ "allOf": [
199
+ {
200
+ "$ref": "#/$defs/message"
201
+ },
202
+ {
203
+ "properties": {
204
+ "content": {
205
+ "type": "null"
206
+ }
207
+ }
208
+ }
209
+ ]
210
+ },
211
+ "modelTarget": {
212
+ "type": "object",
213
+ "additionalProperties": false,
214
+ "required": [
215
+ "name",
216
+ "provider",
217
+ "model",
218
+ "parameters"
219
+ ],
220
+ "properties": {
221
+ "name": {
222
+ "$ref": "#/$defs/nonEmptyString"
223
+ },
224
+ "provider": {
225
+ "$ref": "#/$defs/providerName"
226
+ },
227
+ "model": {
228
+ "$ref": "#/$defs/nonEmptyString"
229
+ },
230
+ "parameters": {
231
+ "$ref": "#/$defs/modelParameters"
232
+ }
233
+ }
234
+ },
235
+ "modelParameters": {
236
+ "type": "object",
237
+ "additionalProperties": false,
238
+ "required": [
239
+ "max_tokens",
240
+ "temperature",
241
+ "seed",
242
+ "stop"
243
+ ],
244
+ "properties": {
245
+ "max_tokens": {
246
+ "oneOf": [
247
+ {
248
+ "type": "integer",
249
+ "minimum": 1,
250
+ "maximum": 9007199254740991
251
+ },
252
+ {
253
+ "type": "null"
254
+ }
255
+ ]
256
+ },
257
+ "temperature": {
258
+ "oneOf": [
259
+ {
260
+ "type": "number",
261
+ "minimum": 0,
262
+ "maximum": 2
263
+ },
264
+ {
265
+ "type": "null"
266
+ }
267
+ ]
268
+ },
269
+ "seed": {
270
+ "oneOf": [
271
+ {
272
+ "$ref": "#/$defs/safeInteger"
273
+ },
274
+ {
275
+ "type": "null"
276
+ }
277
+ ]
278
+ },
279
+ "stop": {
280
+ "type": "array",
281
+ "items": {
282
+ "type": "string",
283
+ "minLength": 1
284
+ }
285
+ }
286
+ }
287
+ },
288
+ "task": {
289
+ "type": "object",
290
+ "additionalProperties": false,
291
+ "required": [
292
+ "id",
293
+ "messages",
294
+ "evaluator",
295
+ "metadata"
296
+ ],
297
+ "properties": {
298
+ "id": {
299
+ "$ref": "#/$defs/nonEmptyString"
300
+ },
301
+ "messages": {
302
+ "type": "array",
303
+ "minItems": 1,
304
+ "items": {
305
+ "$ref": "#/$defs/message"
306
+ }
307
+ },
308
+ "evaluator": {
309
+ "oneOf": [
310
+ {
311
+ "type": "null"
312
+ },
313
+ {
314
+ "$ref": "#/$defs/evaluator"
315
+ },
316
+ {
317
+ "$ref": "#/$defs/redactedEvaluator"
318
+ }
319
+ ]
320
+ },
321
+ "metadata": {
322
+ "type": "object"
323
+ }
324
+ }
325
+ },
326
+ "taskWithContent": {
327
+ "allOf": [
328
+ {
329
+ "$ref": "#/$defs/task"
330
+ },
331
+ {
332
+ "properties": {
333
+ "messages": {
334
+ "items": {
335
+ "$ref": "#/$defs/messageWithContent"
336
+ }
337
+ },
338
+ "evaluator": {
339
+ "oneOf": [
340
+ {
341
+ "type": "null"
342
+ },
343
+ {
344
+ "$ref": "#/$defs/evaluator"
345
+ }
346
+ ]
347
+ }
348
+ }
349
+ }
350
+ ]
351
+ },
352
+ "taskWithoutContent": {
353
+ "allOf": [
354
+ {
355
+ "$ref": "#/$defs/task"
356
+ },
357
+ {
358
+ "properties": {
359
+ "messages": {
360
+ "items": {
361
+ "$ref": "#/$defs/messageWithoutContent"
362
+ }
363
+ },
364
+ "evaluator": {
365
+ "oneOf": [
366
+ {
367
+ "type": "null"
368
+ },
369
+ {
370
+ "$ref": "#/$defs/redactedEvaluator"
371
+ }
372
+ ]
373
+ },
374
+ "metadata": {
375
+ "type": "object",
376
+ "maxProperties": 0
377
+ }
378
+ }
379
+ }
380
+ ]
381
+ },
382
+ "judgeMetadata": {
383
+ "type": "object",
384
+ "additionalProperties": false,
385
+ "required": [
386
+ "judge",
387
+ "judge_provider",
388
+ "judge_model",
389
+ "judge_latency_seconds",
390
+ "judge_attempts",
391
+ "judge_usage"
392
+ ],
393
+ "properties": {
394
+ "judge": {
395
+ "$ref": "#/$defs/nonEmptyString"
396
+ },
397
+ "judge_provider": {
398
+ "$ref": "#/$defs/nonEmptyString"
399
+ },
400
+ "judge_model": {
401
+ "$ref": "#/$defs/nonEmptyString"
402
+ },
403
+ "judge_latency_seconds": {
404
+ "type": "number",
405
+ "minimum": 0
406
+ },
407
+ "judge_attempts": {
408
+ "type": "integer",
409
+ "minimum": 1,
410
+ "maximum": 9007199254740991
411
+ },
412
+ "judge_usage": {
413
+ "$ref": "#/$defs/tokenUsage"
414
+ }
415
+ }
416
+ },
417
+ "evaluator": {
418
+ "oneOf": [
419
+ {
420
+ "$ref": "#/$defs/exactEvaluator"
421
+ },
422
+ {
423
+ "$ref": "#/$defs/containsEvaluator"
424
+ },
425
+ {
426
+ "$ref": "#/$defs/regexEvaluator"
427
+ },
428
+ {
429
+ "$ref": "#/$defs/jsonValidationEvaluator"
430
+ },
431
+ {
432
+ "$ref": "#/$defs/jsonComparisonEvaluator"
433
+ },
434
+ {
435
+ "$ref": "#/$defs/numericEvaluator"
436
+ },
437
+ {
438
+ "$ref": "#/$defs/modelJudgeEvaluator"
439
+ },
440
+ {
441
+ "$ref": "#/$defs/customEvaluator"
442
+ }
443
+ ]
444
+ },
445
+ "redactedEvaluator": {
446
+ "oneOf": [
447
+ {
448
+ "$ref": "#/$defs/redactedRuleEvaluator"
449
+ },
450
+ {
451
+ "$ref": "#/$defs/redactedModelJudgeEvaluator"
452
+ }
453
+ ]
454
+ },
455
+ "redactedRuleEvaluator": {
456
+ "type": "object",
457
+ "additionalProperties": false,
458
+ "required": [
459
+ "type"
460
+ ],
461
+ "properties": {
462
+ "type": {
463
+ "allOf": [
464
+ {
465
+ "$ref": "#/$defs/nonEmptyString"
466
+ },
467
+ {
468
+ "not": {
469
+ "const": "model_judge"
470
+ }
471
+ }
472
+ ]
473
+ }
474
+ }
475
+ },
476
+ "redactedModelJudgeEvaluator": {
477
+ "type": "object",
478
+ "additionalProperties": false,
479
+ "required": [
480
+ "type",
481
+ "target"
482
+ ],
483
+ "properties": {
484
+ "type": {
485
+ "const": "model_judge"
486
+ },
487
+ "target": {
488
+ "$ref": "#/$defs/modelTarget"
489
+ }
490
+ }
491
+ },
492
+ "exactEvaluator": {
493
+ "type": "object",
494
+ "additionalProperties": false,
495
+ "required": [
496
+ "type",
497
+ "expected",
498
+ "strip",
499
+ "ignore_case"
500
+ ],
501
+ "properties": {
502
+ "type": {
503
+ "const": "exact"
504
+ },
505
+ "expected": {
506
+ "type": "string"
507
+ },
508
+ "strip": {
509
+ "type": "boolean"
510
+ },
511
+ "ignore_case": {
512
+ "type": "boolean"
513
+ }
514
+ }
515
+ },
516
+ "containsEvaluator": {
517
+ "type": "object",
518
+ "additionalProperties": false,
519
+ "required": [
520
+ "type",
521
+ "expected",
522
+ "mode",
523
+ "ignore_case"
524
+ ],
525
+ "properties": {
526
+ "type": {
527
+ "const": "contains"
528
+ },
529
+ "expected": {
530
+ "type": "array",
531
+ "minItems": 1,
532
+ "items": {
533
+ "type": "string",
534
+ "minLength": 1
535
+ }
536
+ },
537
+ "mode": {
538
+ "enum": [
539
+ "all",
540
+ "any"
541
+ ]
542
+ },
543
+ "ignore_case": {
544
+ "type": "boolean"
545
+ }
546
+ }
547
+ },
548
+ "regexEvaluator": {
549
+ "type": "object",
550
+ "additionalProperties": false,
551
+ "required": [
552
+ "type",
553
+ "pattern",
554
+ "ignore_case",
555
+ "full_match"
556
+ ],
557
+ "properties": {
558
+ "type": {
559
+ "const": "regex"
560
+ },
561
+ "pattern": {
562
+ "$ref": "#/$defs/nonEmptyString"
563
+ },
564
+ "ignore_case": {
565
+ "type": "boolean"
566
+ },
567
+ "full_match": {
568
+ "type": "boolean"
569
+ }
570
+ }
571
+ },
572
+ "jsonValidationEvaluator": {
573
+ "type": "object",
574
+ "additionalProperties": false,
575
+ "required": [
576
+ "type",
577
+ "compare"
578
+ ],
579
+ "properties": {
580
+ "type": {
581
+ "const": "json"
582
+ },
583
+ "compare": {
584
+ "const": false
585
+ }
586
+ }
587
+ },
588
+ "jsonComparisonEvaluator": {
589
+ "type": "object",
590
+ "additionalProperties": false,
591
+ "required": [
592
+ "type",
593
+ "compare",
594
+ "expected"
595
+ ],
596
+ "properties": {
597
+ "type": {
598
+ "const": "json"
599
+ },
600
+ "compare": {
601
+ "const": true
602
+ },
603
+ "expected": {}
604
+ }
605
+ },
606
+ "numericEvaluator": {
607
+ "type": "object",
608
+ "additionalProperties": false,
609
+ "required": [
610
+ "type",
611
+ "expected",
612
+ "tolerance"
613
+ ],
614
+ "properties": {
615
+ "type": {
616
+ "const": "numeric"
617
+ },
618
+ "expected": {
619
+ "type": "number"
620
+ },
621
+ "tolerance": {
622
+ "type": "number",
623
+ "minimum": 0
624
+ }
625
+ }
626
+ },
627
+ "modelJudgeEvaluator": {
628
+ "type": "object",
629
+ "additionalProperties": false,
630
+ "required": [
631
+ "type",
632
+ "model",
633
+ "target",
634
+ "rubric",
635
+ "reference_answer",
636
+ "pass_threshold"
637
+ ],
638
+ "properties": {
639
+ "type": {
640
+ "const": "model_judge"
641
+ },
642
+ "model": {
643
+ "$ref": "#/$defs/nonEmptyString"
644
+ },
645
+ "target": {
646
+ "$ref": "#/$defs/modelTarget"
647
+ },
648
+ "rubric": {
649
+ "$ref": "#/$defs/nonEmptyString"
650
+ },
651
+ "reference_answer": {
652
+ "type": [
653
+ "string",
654
+ "null"
655
+ ]
656
+ },
657
+ "pass_threshold": {
658
+ "oneOf": [
659
+ {
660
+ "type": "number",
661
+ "minimum": 0,
662
+ "maximum": 1
663
+ },
664
+ {
665
+ "type": "null"
666
+ }
667
+ ]
668
+ }
669
+ }
670
+ },
671
+ "customEvaluator": {
672
+ "type": "object",
673
+ "minProperties": 2,
674
+ "required": [
675
+ "type"
676
+ ],
677
+ "properties": {
678
+ "type": {
679
+ "allOf": [
680
+ {
681
+ "$ref": "#/$defs/nonEmptyString"
682
+ },
683
+ {
684
+ "not": {
685
+ "enum": [
686
+ "exact",
687
+ "contains",
688
+ "regex",
689
+ "json",
690
+ "numeric",
691
+ "model_judge"
692
+ ]
693
+ }
694
+ }
695
+ ]
696
+ }
697
+ }
698
+ },
699
+ "tokenUsage": {
700
+ "type": "object",
701
+ "additionalProperties": false,
702
+ "required": [
703
+ "input_tokens",
704
+ "output_tokens",
705
+ "total_tokens",
706
+ "cached_input_tokens",
707
+ "reasoning_tokens"
708
+ ],
709
+ "properties": {
710
+ "input_tokens": {
711
+ "$ref": "#/$defs/optionalNonNegativeSafeInteger"
712
+ },
713
+ "output_tokens": {
714
+ "$ref": "#/$defs/optionalNonNegativeSafeInteger"
715
+ },
716
+ "total_tokens": {
717
+ "$ref": "#/$defs/optionalNonNegativeSafeInteger"
718
+ },
719
+ "cached_input_tokens": {
720
+ "$ref": "#/$defs/optionalNonNegativeSafeInteger"
721
+ },
722
+ "reasoning_tokens": {
723
+ "$ref": "#/$defs/optionalNonNegativeSafeInteger"
724
+ }
725
+ }
726
+ },
727
+ "generation": {
728
+ "type": "object",
729
+ "additionalProperties": false,
730
+ "required": [
731
+ "text",
732
+ "provider",
733
+ "model",
734
+ "response_model",
735
+ "finish_reason",
736
+ "usage",
737
+ "latency_seconds",
738
+ "attempts",
739
+ "response_id",
740
+ "metadata"
741
+ ],
742
+ "properties": {
743
+ "text": {
744
+ "type": [
745
+ "string",
746
+ "null"
747
+ ]
748
+ },
749
+ "provider": {
750
+ "$ref": "#/$defs/providerName"
751
+ },
752
+ "model": {
753
+ "$ref": "#/$defs/nonEmptyString"
754
+ },
755
+ "response_model": {
756
+ "type": [
757
+ "string",
758
+ "null"
759
+ ]
760
+ },
761
+ "finish_reason": {
762
+ "type": [
763
+ "string",
764
+ "null"
765
+ ]
766
+ },
767
+ "usage": {
768
+ "$ref": "#/$defs/tokenUsage"
769
+ },
770
+ "latency_seconds": {
771
+ "type": "number",
772
+ "minimum": 0
773
+ },
774
+ "attempts": {
775
+ "type": "integer",
776
+ "minimum": 1,
777
+ "maximum": 9007199254740991
778
+ },
779
+ "response_id": {
780
+ "type": [
781
+ "string",
782
+ "null"
783
+ ]
784
+ },
785
+ "metadata": {
786
+ "type": "object"
787
+ }
788
+ }
789
+ },
790
+ "generationWithContent": {
791
+ "allOf": [
792
+ {
793
+ "$ref": "#/$defs/generation"
794
+ },
795
+ {
796
+ "properties": {
797
+ "text": {
798
+ "type": "string"
799
+ }
800
+ }
801
+ }
802
+ ]
803
+ },
804
+ "generationWithoutContent": {
805
+ "allOf": [
806
+ {
807
+ "$ref": "#/$defs/generation"
808
+ },
809
+ {
810
+ "properties": {
811
+ "text": {
812
+ "type": "null"
813
+ },
814
+ "metadata": {
815
+ "type": "object",
816
+ "maxProperties": 0
817
+ }
818
+ }
819
+ }
820
+ ]
821
+ },
822
+ "score": {
823
+ "type": "object",
824
+ "additionalProperties": false,
825
+ "required": [
826
+ "value",
827
+ "passed",
828
+ "reason",
829
+ "metadata"
830
+ ],
831
+ "properties": {
832
+ "value": {
833
+ "type": "number",
834
+ "minimum": 0,
835
+ "maximum": 1
836
+ },
837
+ "passed": {
838
+ "type": [
839
+ "boolean",
840
+ "null"
841
+ ]
842
+ },
843
+ "reason": {
844
+ "type": [
845
+ "string",
846
+ "null"
847
+ ]
848
+ },
849
+ "metadata": {
850
+ "type": "object"
851
+ }
852
+ }
853
+ },
854
+ "scoreWithContent": {
855
+ "allOf": [
856
+ {
857
+ "$ref": "#/$defs/score"
858
+ },
859
+ {
860
+ "properties": {
861
+ "reason": {
862
+ "type": "string"
863
+ }
864
+ }
865
+ }
866
+ ]
867
+ },
868
+ "scoreWithoutContent": {
869
+ "allOf": [
870
+ {
871
+ "$ref": "#/$defs/score"
872
+ },
873
+ {
874
+ "properties": {
875
+ "reason": {
876
+ "type": "null"
877
+ },
878
+ "metadata": {
879
+ "oneOf": [
880
+ {
881
+ "type": "object",
882
+ "maxProperties": 0
883
+ },
884
+ {
885
+ "$ref": "#/$defs/judgeMetadata"
886
+ }
887
+ ]
888
+ }
889
+ }
890
+ }
891
+ ]
892
+ },
893
+ "record": {
894
+ "type": "object",
895
+ "additionalProperties": false,
896
+ "required": [
897
+ "id",
898
+ "target",
899
+ "provider",
900
+ "model",
901
+ "task_id",
902
+ "repetition",
903
+ "status",
904
+ "started_at",
905
+ "finished_at",
906
+ "duration_seconds",
907
+ "generation",
908
+ "score",
909
+ "error",
910
+ "error_metadata"
911
+ ],
912
+ "properties": {
913
+ "id": {
914
+ "type": "integer",
915
+ "minimum": 1,
916
+ "maximum": 9007199254740991
917
+ },
918
+ "target": {
919
+ "$ref": "#/$defs/nonEmptyString"
920
+ },
921
+ "provider": {
922
+ "$ref": "#/$defs/providerName"
923
+ },
924
+ "model": {
925
+ "$ref": "#/$defs/nonEmptyString"
926
+ },
927
+ "task_id": {
928
+ "$ref": "#/$defs/nonEmptyString"
929
+ },
930
+ "repetition": {
931
+ "type": "integer",
932
+ "minimum": 1,
933
+ "maximum": 9007199254740991
934
+ },
935
+ "status": {
936
+ "enum": [
937
+ "ok",
938
+ "score_error",
939
+ "generation_error"
940
+ ]
941
+ },
942
+ "started_at": {
943
+ "$ref": "#/$defs/timestamp"
944
+ },
945
+ "finished_at": {
946
+ "$ref": "#/$defs/timestamp"
947
+ },
948
+ "duration_seconds": {
949
+ "type": "number",
950
+ "minimum": 0
951
+ },
952
+ "generation": {
953
+ "oneOf": [
954
+ {
955
+ "$ref": "#/$defs/generation"
956
+ },
957
+ {
958
+ "type": "null"
959
+ }
960
+ ]
961
+ },
962
+ "score": {
963
+ "oneOf": [
964
+ {
965
+ "$ref": "#/$defs/score"
966
+ },
967
+ {
968
+ "type": "null"
969
+ }
970
+ ]
971
+ },
972
+ "error": {
973
+ "type": [
974
+ "string",
975
+ "null"
976
+ ]
977
+ },
978
+ "error_metadata": {
979
+ "$ref": "#/$defs/errorMetadata"
980
+ }
981
+ },
982
+ "allOf": [
983
+ {
984
+ "if": {
985
+ "properties": {
986
+ "status": {
987
+ "const": "ok"
988
+ }
989
+ }
990
+ },
991
+ "then": {
992
+ "properties": {
993
+ "generation": {
994
+ "$ref": "#/$defs/generation"
995
+ },
996
+ "error": {
997
+ "type": "null"
998
+ },
999
+ "error_metadata": {
1000
+ "type": "object",
1001
+ "maxProperties": 0
1002
+ }
1003
+ }
1004
+ }
1005
+ },
1006
+ {
1007
+ "if": {
1008
+ "properties": {
1009
+ "status": {
1010
+ "const": "score_error"
1011
+ }
1012
+ }
1013
+ },
1014
+ "then": {
1015
+ "properties": {
1016
+ "generation": {
1017
+ "$ref": "#/$defs/generation"
1018
+ },
1019
+ "score": {
1020
+ "type": "null"
1021
+ },
1022
+ "error": {
1023
+ "type": "string",
1024
+ "minLength": 1
1025
+ }
1026
+ }
1027
+ }
1028
+ },
1029
+ {
1030
+ "if": {
1031
+ "properties": {
1032
+ "status": {
1033
+ "const": "generation_error"
1034
+ }
1035
+ }
1036
+ },
1037
+ "then": {
1038
+ "properties": {
1039
+ "generation": {
1040
+ "type": "null"
1041
+ },
1042
+ "score": {
1043
+ "type": "null"
1044
+ },
1045
+ "error": {
1046
+ "type": "string",
1047
+ "minLength": 1
1048
+ }
1049
+ }
1050
+ }
1051
+ }
1052
+ ]
1053
+ },
1054
+ "errorMetadata": {
1055
+ "type": "object",
1056
+ "additionalProperties": false,
1057
+ "properties": {
1058
+ "status_code": {
1059
+ "type": [
1060
+ "integer",
1061
+ "null"
1062
+ ],
1063
+ "minimum": 100,
1064
+ "maximum": 599
1065
+ },
1066
+ "retryable": {
1067
+ "type": "boolean"
1068
+ },
1069
+ "attempts": {
1070
+ "type": "integer",
1071
+ "minimum": 1,
1072
+ "maximum": 9007199254740991
1073
+ }
1074
+ }
1075
+ },
1076
+ "recordWithContent": {
1077
+ "allOf": [
1078
+ {
1079
+ "$ref": "#/$defs/record"
1080
+ },
1081
+ {
1082
+ "properties": {
1083
+ "generation": {
1084
+ "oneOf": [
1085
+ {
1086
+ "$ref": "#/$defs/generationWithContent"
1087
+ },
1088
+ {
1089
+ "type": "null"
1090
+ }
1091
+ ]
1092
+ },
1093
+ "score": {
1094
+ "oneOf": [
1095
+ {
1096
+ "$ref": "#/$defs/scoreWithContent"
1097
+ },
1098
+ {
1099
+ "type": "null"
1100
+ }
1101
+ ]
1102
+ }
1103
+ }
1104
+ }
1105
+ ]
1106
+ },
1107
+ "recordWithoutContent": {
1108
+ "allOf": [
1109
+ {
1110
+ "$ref": "#/$defs/record"
1111
+ },
1112
+ {
1113
+ "properties": {
1114
+ "generation": {
1115
+ "oneOf": [
1116
+ {
1117
+ "$ref": "#/$defs/generationWithoutContent"
1118
+ },
1119
+ {
1120
+ "type": "null"
1121
+ }
1122
+ ]
1123
+ },
1124
+ "score": {
1125
+ "oneOf": [
1126
+ {
1127
+ "$ref": "#/$defs/scoreWithoutContent"
1128
+ },
1129
+ {
1130
+ "type": "null"
1131
+ }
1132
+ ]
1133
+ }
1134
+ }
1135
+ }
1136
+ ]
1137
+ },
1138
+ "summaryRow": {
1139
+ "type": "object",
1140
+ "additionalProperties": false,
1141
+ "required": [
1142
+ "name",
1143
+ "provider",
1144
+ "model",
1145
+ "runs",
1146
+ "generated",
1147
+ "successful",
1148
+ "errors",
1149
+ "scored",
1150
+ "average_score",
1151
+ "pass_rate",
1152
+ "average_latency_seconds",
1153
+ "input_tokens",
1154
+ "output_tokens",
1155
+ "judge_input_tokens",
1156
+ "judge_output_tokens",
1157
+ "judge_latency_seconds",
1158
+ "elo",
1159
+ "rank"
1160
+ ],
1161
+ "properties": {
1162
+ "name": {
1163
+ "$ref": "#/$defs/nonEmptyString"
1164
+ },
1165
+ "provider": {
1166
+ "$ref": "#/$defs/providerName"
1167
+ },
1168
+ "model": {
1169
+ "$ref": "#/$defs/nonEmptyString"
1170
+ },
1171
+ "runs": {
1172
+ "$ref": "#/$defs/nonNegativeSafeInteger",
1173
+ "description": "Total attempted records for this target."
1174
+ },
1175
+ "generated": {
1176
+ "$ref": "#/$defs/nonNegativeSafeInteger",
1177
+ "description": "Records that contain a generation, including score failures."
1178
+ },
1179
+ "successful": {
1180
+ "$ref": "#/$defs/nonNegativeSafeInteger",
1181
+ "description": "Records completed without an error."
1182
+ },
1183
+ "errors": {
1184
+ "$ref": "#/$defs/nonNegativeSafeInteger",
1185
+ "description": "Records that contain an error."
1186
+ },
1187
+ "scored": {
1188
+ "$ref": "#/$defs/nonNegativeSafeInteger"
1189
+ },
1190
+ "average_score": {
1191
+ "oneOf": [
1192
+ {
1193
+ "type": "number",
1194
+ "minimum": 0,
1195
+ "maximum": 1
1196
+ },
1197
+ {
1198
+ "type": "null"
1199
+ }
1200
+ ]
1201
+ },
1202
+ "pass_rate": {
1203
+ "oneOf": [
1204
+ {
1205
+ "type": "number",
1206
+ "minimum": 0,
1207
+ "maximum": 1
1208
+ },
1209
+ {
1210
+ "type": "null"
1211
+ }
1212
+ ]
1213
+ },
1214
+ "average_latency_seconds": {
1215
+ "oneOf": [
1216
+ {
1217
+ "type": "number",
1218
+ "minimum": 0
1219
+ },
1220
+ {
1221
+ "type": "null"
1222
+ }
1223
+ ]
1224
+ },
1225
+ "input_tokens": {
1226
+ "$ref": "#/$defs/nonNegativeSafeInteger"
1227
+ },
1228
+ "output_tokens": {
1229
+ "$ref": "#/$defs/nonNegativeSafeInteger"
1230
+ },
1231
+ "judge_input_tokens": {
1232
+ "$ref": "#/$defs/nonNegativeSafeInteger",
1233
+ "description": "Input tokens used by model judges for this target."
1234
+ },
1235
+ "judge_output_tokens": {
1236
+ "$ref": "#/$defs/nonNegativeSafeInteger",
1237
+ "description": "Output tokens used by model judges for this target."
1238
+ },
1239
+ "judge_latency_seconds": {
1240
+ "type": "number",
1241
+ "minimum": 0,
1242
+ "description": "Total model-judge latency for this target."
1243
+ },
1244
+ "elo": {
1245
+ "type": "number"
1246
+ },
1247
+ "rank": {
1248
+ "type": "integer",
1249
+ "minimum": 1,
1250
+ "maximum": 9007199254740991
1251
+ }
1252
+ }
1253
+ },
1254
+ "arena": {
1255
+ "type": "object",
1256
+ "additionalProperties": false,
1257
+ "required": [
1258
+ "schema_version",
1259
+ "initial_rating",
1260
+ "k_factor",
1261
+ "contestants",
1262
+ "matches"
1263
+ ],
1264
+ "properties": {
1265
+ "schema_version": {
1266
+ "const": 1
1267
+ },
1268
+ "initial_rating": {
1269
+ "type": "number"
1270
+ },
1271
+ "k_factor": {
1272
+ "type": "number",
1273
+ "exclusiveMinimum": 0
1274
+ },
1275
+ "contestants": {
1276
+ "type": "array",
1277
+ "minItems": 1,
1278
+ "items": {
1279
+ "$ref": "#/$defs/arenaContestant"
1280
+ }
1281
+ },
1282
+ "matches": {
1283
+ "type": "array",
1284
+ "items": {
1285
+ "$ref": "#/$defs/arenaMatch"
1286
+ }
1287
+ }
1288
+ }
1289
+ },
1290
+ "arenaContestant": {
1291
+ "type": "object",
1292
+ "additionalProperties": false,
1293
+ "required": [
1294
+ "name",
1295
+ "metadata"
1296
+ ],
1297
+ "properties": {
1298
+ "name": {
1299
+ "$ref": "#/$defs/nonEmptyString"
1300
+ },
1301
+ "metadata": {
1302
+ "type": "object",
1303
+ "additionalProperties": false,
1304
+ "required": [
1305
+ "provider",
1306
+ "model"
1307
+ ],
1308
+ "properties": {
1309
+ "provider": {
1310
+ "$ref": "#/$defs/providerName"
1311
+ },
1312
+ "model": {
1313
+ "$ref": "#/$defs/nonEmptyString"
1314
+ }
1315
+ }
1316
+ }
1317
+ }
1318
+ },
1319
+ "arenaMatch": {
1320
+ "type": "object",
1321
+ "additionalProperties": false,
1322
+ "required": [
1323
+ "id",
1324
+ "left",
1325
+ "right",
1326
+ "result",
1327
+ "metadata"
1328
+ ],
1329
+ "properties": {
1330
+ "id": {
1331
+ "type": "integer",
1332
+ "minimum": 1,
1333
+ "maximum": 9007199254740991
1334
+ },
1335
+ "left": {
1336
+ "$ref": "#/$defs/nonEmptyString"
1337
+ },
1338
+ "right": {
1339
+ "$ref": "#/$defs/nonEmptyString"
1340
+ },
1341
+ "result": {
1342
+ "enum": [
1343
+ "left",
1344
+ "right",
1345
+ "draw"
1346
+ ]
1347
+ },
1348
+ "metadata": {
1349
+ "$ref": "#/$defs/arenaMatchMetadata"
1350
+ }
1351
+ }
1352
+ },
1353
+ "arenaMatchMetadata": {
1354
+ "type": "object",
1355
+ "additionalProperties": false,
1356
+ "required": [
1357
+ "localarena"
1358
+ ],
1359
+ "properties": {
1360
+ "localarena": {
1361
+ "type": "object",
1362
+ "additionalProperties": false,
1363
+ "required": [
1364
+ "version",
1365
+ "kind",
1366
+ "task_id",
1367
+ "repetition",
1368
+ "record_ids",
1369
+ "scores"
1370
+ ],
1371
+ "properties": {
1372
+ "version": {
1373
+ "const": 1
1374
+ },
1375
+ "kind": {
1376
+ "const": "task-score"
1377
+ },
1378
+ "task_id": {
1379
+ "$ref": "#/$defs/nonEmptyString"
1380
+ },
1381
+ "repetition": {
1382
+ "type": "integer",
1383
+ "minimum": 1,
1384
+ "maximum": 9007199254740991
1385
+ },
1386
+ "record_ids": {
1387
+ "type": "array",
1388
+ "minItems": 2,
1389
+ "maxItems": 2,
1390
+ "uniqueItems": true,
1391
+ "items": {
1392
+ "type": "integer",
1393
+ "minimum": 1,
1394
+ "maximum": 9007199254740991
1395
+ }
1396
+ },
1397
+ "scores": {
1398
+ "type": "object",
1399
+ "additionalProperties": false,
1400
+ "required": [
1401
+ "left",
1402
+ "right"
1403
+ ],
1404
+ "properties": {
1405
+ "left": {
1406
+ "type": "number",
1407
+ "minimum": 0,
1408
+ "maximum": 1
1409
+ },
1410
+ "right": {
1411
+ "type": "number",
1412
+ "minimum": 0,
1413
+ "maximum": 1
1414
+ }
1415
+ }
1416
+ }
1417
+ }
1418
+ }
1419
+ }
1420
+ }
1421
+ }
1422
+ }