Judge configuration
Thejudge object configures the model that assesses each input. It is required for every evaluation type.
During execution, the service appends its own output-format instruction to the judge’s prompt, requiring a JSON response with a
feedback field and the verdict (a label, score, or choice). Judge responses that don’t parse into a valid verdict are counted in invalid_label_count or invalid_score_count in the results.
Model configuration
model_to_evaluate, model_a, and model_b each accept either a string naming a dataset column that already holds responses, or a model configuration object that generates fresh responses. The object uses these fields.
Evaluation type parameters
Every type also requiresinput_data_file_path, the file ID of the uploaded dataset.
Classify
Score
Compare
When both
model_a and model_b are configuration objects, their inference runs execute in parallel. Under the default two-pass correction, the winner is declared only when both passes agree; disagreement is recorded as a tie. If only one pass produces a parseable verdict, that verdict decides, and the row is flagged with is_invalid_judge_output in the result file.
Dataset columns
Every column in the input dataset must be used by the job. A column counts as used when it is one of the following:- Template-referenced: Injected with a
{{column_name}}placeholder in any model or judgesystem_templateorinput_template. A nested reference like{{info.question}}counts for its top-level column,info. - A pre-generated response column: Named as the string value of
model_to_evaluate,model_a, ormodel_b. - The image column:
image_data_urls, for vision evaluations.
user_error status with the offending columns listed in results.error:
Text
id or category before uploading, or keep a column by referencing it in a template, for example passing {{ground_truth}} to the judge as a reference answer.
Job lifecycle
Creating a job returns aworkflow_id and a pending status. The job then moves through queued and running before reaching completed. A job that fails ends in error (an internal failure) or user_error (a problem with the request or dataset), with the failure reason in results.error. Retrieving the job returns the current status, a timestamped status_updates entry for each transition, the request parameters, and, once the job completes, the aggregated results:
JSON
Result formats
A completed job returns aggregated results and aresult_file_id. The aggregated fields depend on the evaluation type.
Classify
Score
Compare
Result files
Pass theresult_file_id to the Files API to download the full report. Each line holds the original input, any generated responses, the judge’s decision and feedback, and an evaluation_successful field (true or false) indicating whether the row was processed successfully. The result file retains every input row; if more than 30% of rows fail generation or judging, the job itself fails instead.
For large result files, stream the download line by line instead of buffering it:
Python
JSON
choice_* and judge_feedback_* pairs come from the two position-bias-correction passes; choice_flipped is expressed in original-order terms, so the flipped pass’s raw "A" above records the same winner. With disable_position_bias_correction: true, only the original-order fields are present. Classify and score result lines follow the same pattern, with the judge’s label or score and feedback in place of the pairwise fields.
Templates
Bothsystem_template and input_template support Jinja2 syntax. Reference a dataset column by wrapping its name in double braces to inject its value into the prompt.
Given this dataset row:
JSON
Python
Text
JSON
Python