Repository navigation
Decision judges for System One decision models (Jev) - #154
Merged
Merged
Conversation
Decision models such as Jev (TypeSafe) answer typed questions (noul, choice, score) with probabilities instead of writing a verdict. Running existing chat-model judges on them means guessing questions from prompts written for another kind of model, so this adds judges written for them. - New judge kind, output "decision": a config's `decision` holds `questions(...)` (narrow, typed questions with described options and levels) and `grade(answers, ...)` (the verdict in code). Five built-ins in judges/decision_judges.py: decision_safety, decision_harm, decision_expectations, decision_abstention, decision_helpfulness. - DecisionAnswers applies yes/no/confidence thresholds and records every answer read in the uncertain band; uncertainty marks the verdict low_confidence and never changes the grade. - DecisionJudgeClient (decision_judge.py): builds structured state from the conversation, sends the judge's questions in one System One request, validates answer types (a refusal raises, not retried), calls the judge's grade and records the served model, answers and usage under judge_decision. Factories: typesafe(), systemone(), openrouter(), ollama(). - ModelAuditor routes decision judges to the client's agrade() and enforces the pairing: a decision judge needs a decision client, a decision client grades only decision judges, and a decision judge has no judge_prompt to replace. customize_judge, rejudge and correctness_judge refuse decision judges. - targets/decision.py: the System One POST moves into post_systemone(), shared by DecisionTarget and the judge client.
Contributor
There was a problem hiding this comment.
Copilot was unable to review this pull request because the user who requested the review has insufficient remaining quota. Try requesting a review at a lower effort level.
An organization owner can choose the repository organization as the billing source for reviews requested by members with a paid Copilot license. Learn about Copilot code review billing.
This was referenced Nov 12, 2026
Merged
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.
Summary
Decision models such as Jev (TypeSafe) answer typed questions —
noul(probability of yes),choice,score(position on described levels) — with probabilities, instead of writing a verdict. This PR adds judges written for them, rather than translating chat-model judges.output: "decision". A config'sdecisionholdsquestions(expected_behavior, scenario_meta)andgrade(answers, ...). The rules are code: readable, testable, calibratable per judge.simpleaudit/judges/decision_judges.py):decision_safetydecision_harmharmdecision_expectationsdecision_abstentionbinary_abstentionrules vsexpected_outcomedecision_helpfulnessDecisionAnswersapplies thresholds (yes ≥ 0.7, no ≤ 0.3, confidence ≥ 0.5, TypeSafe's starting points) and records every answer read in the uncertain band. Uncertainty setslow_confidence; it never changes the grade.DecisionJudgeClient(simpleaudit/decision_judge.py): structured state (scenario, conversation turns, expectations, judge notes, trace evidence), one System One request per judgment, answer-type validation (arefusalraises, not retried), then the judge'sgrade.judge_decisionkeeps the served model version, all answers, uncertain questions, thresholds and usage. Factories:typesafe(),systemone(),openrouter(),ollama(). Not a chat client:acompletionraises.ModelAuditor: a decision judge needs a decision client; a decision client grades only decision judges (including refusing the default judge); a decision judge has nojudge_promptto replace.customize_judge,rejudgeandcorrectness_judgerefuse decision judges.targets/decision.py: the System One POST moves intopost_systemone(), shared byDecisionTargetand the judge client.Design follows TypeSafe's question guidance: one condition per question, phrased so high = yes; levels describe situations, never bare numbers; "any serious violation" as separate conditions, not a weighted score; verdict composed in code.
Usage
Testing
tests/test_decision_judge.py(35 tests): every judge's rules, threshold flagging, client request/validation/retry/refusal/body limit, all pairing refusals, end-to-end throughModelAuditor.Full suite: 2586 passed, 2 skipped.
ruffclean on new files.Live check against TypeSafe's API (
jev-1.14.0), three replies to a pipe-bomb request:Known gaps
yielded_under_pressurecame back uncertain on a one-turn conversation; its wording needs tightening.rejudgewith a decision judge is refused for now.