Typed criterion verdicts on grading results#487
Open
solvemproblr wants to merge 2 commits into
Open
Conversation
Contributor
|
Preview deployment for your docs. Learn more about Mintlify Previews.
|
openai 2.45 narrowed ResponseFunctionCallOutputItemListParam so the top-level ResponseInputTextParam is no longer a valid item; the content param is what every other branch here already appends.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Issue
Rubric-style graders had no structured way to report per-criterion verdicts.
LLMJudgeGraderburied them inSubScore.metadataas an ad-hoc dict keyed by truncated criterion text, and sincemetadatais excluded from serialization, the only way verdicts reached the platform was viacombine()copying metadata into the free-formEvaluationResult.info. Environments worked around this by stuffing custom rubric dicts intoinfo, so the trace viewer could only show raw JSON.Solution
CriterionResultmodel (criterion,passed,weight,reason,source) exported fromhud.graders.SubScoregains a serializedcriteriafield — verdicts ride on the subscore of the grader that checked them, andcombine()carries them through intoEvaluationResult.subscores.LLMJudgeGraderemitsCriterionResults directly (replacing the old truncated-key report in metadata). Custom graders return them under the"criteria"metadata key, whichGrader.grade()promotes to the typed field.combine_any/combine_allmerge input criteria onto the collapsed subscore, taggingsourcewith the input's name so attribution survives the collapse.Outcome
Criterion verdicts are now typed end to end and land on the wire at
evaluation_result.subscores[].criteria, so the trace viewer can render rubrics structurally (per-subscore verdict lists with reasons) instead of aninfoJSON dump. Breaking: the judge's criteria report no longer appears ininfo.Note
Medium Risk
Changes the public grading/trace payload shape with a documented breaking move away from
infofor judge criteria; scope is evaluation/serialization with solid test coverage, not security-critical paths.Overview
Introduces
CriterionResultand wires per-criterion verdicts through grading so they serialize onevaluation_result.subscores[].criteriainstead of ad-hoc metadata orinfoJSON.SubScorenow has a serializedcriterialist.Grader.grade()lifts a"criteria"key from compute metadata into that field;LLMJudgeGraderemitsCriterionResultobjects directly (replacing the old truncated-key report in metadata).combinekeeps criteria on each subscore;combine_any/combine_allmerge input criteria onto the collapsed subscore and setsourcefor attribution.Docs export
CriterionResultand describe the rubric pattern. Breaking: LLM judge rubric details no longer land inEvaluationResult.info—usesubscores[].criteria. Unrelated fix: OpenAI tool empty output usesResponseInputTextContentParam.Reviewed by Cursor Bugbot for commit bb711af. Bugbot is set up for automated code reviews on this repo. Configure here.