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 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
{
    "$schema": "http://json-schema.org/draft-07/schema#",
    "version": "0.2.0",
    "type": "object",
    "description": "Schema for storing and validating LLMs evaluation data, including model configuration, prompts, instances, Output, and evaluation metrics",
    "required": [
        "schema_version",
        "evaluation_id",
        "retrieved_timestamp",
        "source_metadata",
        "model_info",
        "evaluation_results"
    ],
    "additionalProperties": false,
    "properties": {
        "schema_version": {
            "type": "string",
            "description": "Version of the schema used for this evaluation data"
        },
        "evaluation_id": {
            "type": "string",
            "description": "Unique identifier for this specific evaluation run. Use eval_name/model_id/retrieved_timestamp format"
        },
        "evaluation_timestamp": {
            "type": "string",
            "description": "Timestamp for when the evaluation was run"
        },
        "retrieved_timestamp": {
            "type": "string",
            "description": "Timestamp for when this record was created - using Unix Epoch time format"
        },
        "source_metadata": {
            "type": "object",
            "description": "Metadata about the source of the leaderboard data",
            "required": [
                "source_type",
                "source_organization_name",
                "evaluator_relationship"
            ],
            "properties": {
                "source_name": {
                    "type": "string",
                    "description": "Name of the source (e.g. title of the source leaderboard or name of the platform used for the evaluation)."
                },
                "source_type": {
                    "type": "string",
                    "enum": [
                        "documentation",
                        "evaluation_run"
                    ],
                    "description": "Whether the data comes from a direct evaluation run or from documentation"
                },
                "source_organization_name": {
                    "type": "string",
                    "description": "Name of the organization that provides the data"
                },
                "source_organization_url": {
                    "type": "string",
                    "description": "URL for the organization that provides the data"
                },
                "source_organization_logo_url": {
                    "type": "string",
                    "description": "URL for the Logo for the organization that provides the data"
                },
                "evaluator_relationship": {
                    "type": "string",
                    "description": "Relationship between the evaluator and the model",
                    "enum": [
                        "first_party",
                        "third_party",
                        "collaborative",
                        "other"
                    ]
                }
            }
        },
        "model_info": {
            "$ref": "#/$defs/model_info"
        },
        "evaluation_results": {
            "type": "array",
            "description": "Array of evaluation results",
            "items": {
                "type": "object",
                "required": [
                    "evaluation_name",
                    "source_data",
                    "metric_config",
                    "score_details"
                ],
                "properties": {
                    "evaluation_name": {
                        "type": "string",
                        "description": "Name of the evaluation"
                    },
                    "source_data": {
                        "description": "Source of dataset for this evaluation: URL, HuggingFace dataset, or private/custom dataset.",
                        "oneOf": [
                            {
                                "$ref": "#/$defs/source_data_url"
                            },
                            {
                                "$ref": "#/$defs/source_data_hf"
                            },
                            {
                                "$ref": "#/$defs/source_data_private"
                            }
                        ]
                    },
                    "evaluation_timestamp": {
                        "type": "string",
                        "description": "Timestamp for when the evaluations were run"
                    },
                    "metric_config": {
                        "type": "object",
                        "description": "Details about the metric",
                        "required": [
                            "lower_is_better"
                        ],
                        "properties": {
                            "evaluation_description": {
                                "type": "string",
                                "description": "Description of the evaluation"
                            },
                            "lower_is_better": {
                                "type": "boolean",
                                "description": "Whether a lower score is better"
                            },
                            "score_type": {
                                "type": "string",
                                "description": "Type of score",
                                "enum": [
                                    "binary",
                                    "continuous",
                                    "levels"
                                ]
                            },
                            "level_names": {
                                "type": "array",
                                "description": "Names of the score levels",
                                "items": {
                                    "type": "string"
                                }
                            },
                            "level_metadata": {
                                "type": "array",
                                "description": "Additional Description for each Score Level",
                                "items": {
                                    "type": "string"
                                }
                            },
                            "has_unknown_level": {
                                "type": "boolean",
                                "description": "Indicates whether there is an Unknown Level - if True, then a score of -1 will be treated as Unknown"
                            },
                            "min_score": {
                                "type": "number",
                                "description": "Minimum possible score for continuous metric"
                            },
                            "max_score": {
                                "type": "number",
                                "description": "Maximum possible score for continuous metric"
                            },
                            "llm_scoring": {
                                "type": "object",
                                "description": "Configuration when LLM is used as scorer/judge",
                                "additionalProperties": true,
                                "required": [
                                    "judges",
                                    "input_prompt"
                                ],
                                "properties": {
                                    "judges": {
                                        "type": "array",
                                        "description": "LLM judge(s) - single item for judge, multiple for jury",
                                        "items": {
                                            "$ref": "#/$defs/judge_config"
                                        },
                                        "minItems": 1
                                    },
                                    "input_prompt": {
                                        "type": "string",
                                        "description": "Prompt template used for judging"
                                    },
                                    "aggregation_method": {
                                        "type": "string",
                                        "enum": [
                                            "majority_vote",
                                            "average",
                                            "weighted_average",
                                            "median"
                                        ],
                                        "description": "How to aggregate scores when multiple judges"
                                    },
                                    "expert_baseline": {
                                        "type": "number",
                                        "description": "Expert/human baseline score for comparison"
                                    },
                                    "additional_details": {
                                        "$ref": "#/$defs/additional_properties_object"
                                    }
                                }
                            }
                        },
                        "if": {
                            "properties": {
                                "score_type": {
                                    "const": "levels"
                                }
                            }
                        },
                        "then": {
                            "required": [
                                "level_names",
                                "has_unknown_level"
                            ]
                        },
                        "else": {
                            "if": {
                                "properties": {
                                    "score_type": {
                                        "const": "continuous"
                                    }
                                }
                            },
                            "then": {
                                "required": [
                                    "min_score",
                                    "max_score"
                                ]
                            }
                        }
                    },
                    "score_details": {
                        "type" : "object",
                        "description": "The score for the evaluation and related details",
                        "required": [
                            "score"
                        ],
                        "properties": {
                            "score": {
                                "type": "number",
                                "description": "The score for the evaluation"
                            },
                            "details": {
                                "$ref": "#/$defs/additional_properties_object"
                            },
                            "uncertainty": {
                                "type": "object",
                                "description": "Quantification of uncertainty around the reported score",
                                "properties": {
                                    "standard_error": {
                                        "type": "object",
                                        "description": "Standard error of the score estimate (SE_mean = standard_deviation / sqrt(num_samples))",
                                        "properties": {
                                            "value": {
                                                "type": "number",
                                                "description": "The standard error value"
                                            },
                                            "method": {
                                                "type": "string",
                                                "description": "How the standard error was computed (e.g. 'analytic', 'bootstrap', 'jackknife')"
                                            }
                                        },
                                        "required": ["value"]
                                    },
                                    "confidence_interval": {
                                        "type": "object",
                                        "description": "Lower and upper bounds for the metric at a given confidence level.",
                                        "properties": {
                                            "lower": {
                                                "type": "number",
                                                "description": "Lower bound of the confidence interval"
                                            },
                                            "upper": {
                                                "type": "number",
                                                "description": "Upper bound of the confidence interval"
                                            },
                                            "confidence_level": {
                                                "type": "number",
                                                "description": "Confidence level (e.g. 0.95 for a 95% confidence interval)",
                                                "minimum": 0,
                                                "maximum": 1
                                            },
                                            "method": {
                                                "type": "string",
                                                "description": "How the confidence interval was computed"
                                            }
                                        },
                                        "required": ["lower", "upper"]
                                    },
                                    "standard_deviation": {
                                        "type": "number",
                                        "description": "Standard deviation of the per-sample scores"
                                    },
                                    "num_samples": {
                                        "type": "integer",
                                        "description": "Number of samples used to compute the uncertainty estimates"
                                    },
                                    "num_bootstrap_samples": {
                                        "type": "integer",
                                        "description": "Number of bootstrap resamples used, if bootstrap method was applied"
                                    }
                                }
                            }
                        }
                    },
                    "generation_config": {
                        "type": "object",
                        "properties": {
                            "generation_args": {
                                "type": "object",
                                "description": "Parameters used to generate results - properties may vary by model type",
                                "properties": {
                                    "temperature": {
                                        "type": [
                                            "null",
                                            "number"
                                        ],
                                        "description": "Sampling temperature"
                                    },
                                    "top_p": {
                                        "type": [
                                            "null",
                                            "number"
                                        ],
                                        "description": "Nucleus sampling parameter"
                                    },
                                    "top_k": {
                                        "type": [
                                            "null",
                                            "number"
                                        ],
                                        "description": "Top-k sampling parameter"
                                    },
                                    "max_tokens": {
                                        "type": "integer",
                                        "minimum": 1,
                                        "description": "Maximum number of tokens to generate"
                                    },
                                    "execution_command": {
                                        "type": "string",
                                        "description": "Command used to run the model to generate results"
                                    },
                                    "reasoning": {
                                        "type": "boolean",
                                        "description": "Whether reasoning orchain-of-thought was used to generate results"
                                    },
                                    "prompt_template": {
                                        "type": "string",
                                        "description": "Input prompt template for task (should contain agentic info if needed)."
                                    },
                                    "agentic_eval_config": {
                                        "type": "object",
                                        "description": "General configuration for agentic evaluations.",
                                        "properties": {
                                            "available_tools": {
                                                "type": "array",
                                                "description": "List of all available tools with their configurations",
                                                "items": {
                                                    "type": "object",
                                                    "properties": {
                                                        "name": {
                                                            "type": "string",
                                                            "description": "e.g. bash, calculator, ..."
                                                        },
                                                        "description": {
                                                            "type": "string"
                                                        },
                                                        "parameters": {
                                                            "$ref": "#/$defs/additional_properties_object"
                                                        }
                                                    }
                                                }
                                            },
                                            "additional_details": {
                                                "$ref": "#/$defs/additional_properties_object"
                                            }
                                        }
                                    },
                                    "eval_plan": {
                                        "type": "object",
                                        "description": "Plan (solvers) used in evaluation. Solvers are crucial parts of Inspect evaluations which can serve a wide variety of purposes like providing system prompts, prompt engineering, model generation or multi-turn dialog.",
                                        "properties": {
                                            "name": {
                                                "type": "string"
                                            },
                                            "steps": {
                                                "type": "array",
                                                "description": "Array of evaluation plan steps",
                                                "items": {
                                                    "solver": {
                                                        "type": "string",
                                                        "description": "Name of solver e.g. system_message, react."
                                                    },
                                                    "parameters": {
                                                        "$ref": "#/$defs/additional_properties_object"
                                                    }
                                                }
                                            },
                                            "config": {
                                                "$ref": "#/$defs/additional_properties_object"
                                            }
                                        }
                                    },
                                    "eval_limits": {
                                        "type": "object",
                                        "description": "Listed evaluation limits like time limit, message limit, token limit.",
                                        "properties": {
                                            "time_limit": {
                                                "type": "integer",
                                                "description": "Time limit for evaluation."
                                            },
                                            "message_limit": {
                                                "type": "integer",
                                                "description": "Message limit for evaluation."
                                            },
                                            "token_limit": {
                                                "type": "integer",
                                                "description": "Token limit for evaluation."
                                            }
                                        }
                                    },
                                    "sandbox": {
                                        "type": "object",
                                        "properties": {
                                            "type": {
                                                "type": "string",
                                                "description": "Type of sandbox e.g. docker"
                                            },
                                            "config": {
                                                "type": "string",
                                                "description": "Config file name/path e.g. compose.yaml. TODO or full config? Not sure based on the Inspect docs"
                                            }
                                        }
                                    },
                                    "max_attempts": {
                                        "type": "integer",
                                        "description": "Maximum number of submission attempts (default 1).",
                                        "default": 1
                                    },
                                    "incorrect_attempt_feedback": {
                                        "type": "string",
                                        "description": "Feedback from the model after incorrect attempt."
                                    }
                                },
                                "additionalProperties": true
                            },
                            "additional_details": {
                                "$ref": "#/$defs/additional_properties_object"
                            }
                        }
                    }
                }
            }
        },
        "detailed_evaluation_results": {
            "description": "Reference to the evaluation results for all individual samples in the evaluation",
            "properties": {
                "format": {
                    "type": "string",
                    "description": "Format of the detailed evaluation results",
                    "enum": [
                        "jsonl",
                        "json"
                    ]
                },
                "file_path": {
                    "type": "string",
                    "description": "Path to the detailed evaluation results file"
                },
                "hash_algorithm": {
                    "type": "string",
                    "description": "Hash algorithm used for checksum and sample_hash in instance-level data",
                    "enum": [
                        "sha256",
                        "md5"
                    ]
                },
                "checksum": {
                    "type": "string",
                    "description": "Checksum value of the file"
                },
                "total_rows": {
                    "type": "integer",
                    "description": "Total number of rows in the detailed evaluation results file"
                }
            }
        }
    },
    "$defs": {
        "additional_properties_object": {
            "type": "object",
            "description": "Additional parameters (key-value object)",
            "additionalProperties": true
        },
        "judge_config": {
            "type": "object",
            "description": "Configuration for a single LLM judge/juror",
            "required": [
                "model_info"
            ],
            "properties": {
                "model_info": {
                    "$ref": "#/$defs/model_info"
                },
                "temperature": {
                    "type": "number"
                },
                "weight": {
                    "type": "number",
                    "description": "Weight of this judge's score in aggregation (used in jury)"
                }
            }
        },
        "model_info": {
            "type": "object",
            "description": "Complete model specification including basic information, technical configuration and inference settings",
            "required": [
                "name",
                "id"
            ],
            "properties": {
                "name": {
                    "type": "string",
                    "description": "Model name provided by evaluation source"
                },
                "id": {
                    "type": "string",
                    "description": "Model name in HuggingFace format (e.g. meta-llama/Llama-3.1-8B-Instruct for models available on HuggingFace or openai/azure/gpt-4o-mini-2024-07-18 for closed API models)"
                },
                "developer": {
                    "type": "string",
                    "description": "Name of organization that provides the model (e.g. 'OpenAI')"
                },
                "inference_platform": {
                    "type": "string",
                    "description": "Name of inference platform which provides an access to models by API to run the evaluations or provides models weights to run them locally (e.g. HuggingFace, Bedrock, Together AI)"
                },
                "inference_engine": {
                    "type": "object",
                    "description": "Name of inference engine which provides an access to optimized models to use them for local evaluations (e.g. vLLM, Ollama).",
                    "properties": {
                        "name": {
                            "type": "string",
                            "description": "Name of the inference engine"
                        },
                        "version": {
                            "type": "string",
                            "description": "Version of the inference engine"
                        }
                    }
                },
                "additional_details": {
                    "$ref": "#/$defs/additional_properties_object"
                }
            }
        },
        "source_data_url": {
            "type": "object",
            "description": "URL source for the evaluation data",
            "required": [
                "dataset_name",
                "source_type",
                "url"
            ],
            "additionalProperties": true,
            "properties": {
                "dataset_name": {
                    "type": "string",
                    "description": "Name of the source dataset"
                },
                "source_type": {
                    "const": "url"
                },
                "url": {
                    "type": "array",
                    "items": {
                        "type": "string"
                    },
                    "minItems": 1,
                    "description": "URL(s) for the source of the evaluation data"
                },
                "additional_details": {
                    "$ref": "#/$defs/additional_properties_object"
                }
            }
        },
        "source_data_hf": {
            "type": "object",
            "description": "Details about HuggingFace dataset used for evaluation",
            "required": [
                "dataset_name",
                "source_type"
            ],
            "additionalProperties": true,
            "properties": {
                "dataset_name": {
                    "type": "string",
                    "description": "Name of the source dataset"
                },
                "source_type": {
                    "const": "hf_dataset"
                },
                "hf_repo": {
                    "type": "string",
                    "description": "HuggingFace repository identifier"
                },
                "hf_split": {
                    "type": "string",
                    "description": "One of train, val or test."
                },
                "samples_number": {
                    "type": "integer",
                    "description": "Number of samples in the dataset"
                },
                "sample_ids": {
                    "type": "array",
                    "description": "Array of sample ids used for evaluation",
                    "items": {
                        "type": [
                            "integer",
                            "string"
                        ]
                    }
                },
                "additional_details": {
                    "$ref": "#/$defs/additional_properties_object"
                }
            }
        },
        "source_data_private": {
            "type": "object",
            "description": "Generic source data when neither URL array nor HuggingFace dataset applies",
            "required": [
                "dataset_name",
                "source_type"
            ],
            "properties": {
                "dataset_name": {
                    "type": "string",
                    "description": "Name of the source dataset"
                },
                "source_type": {
                    "const": "other"
                },
                "additional_details": {
                    "$ref": "#/$defs/additional_properties_object"
                }
            }
        }
    }
}