Repository navigation
feat(libsy)!: route decision choices through explicit policies - #1013
Open
nachiketb-nvidia wants to merge 1 commit into
Open
nachiketb-nvidia wants to merge 1 commit into
nachiketb-nvidia wants to merge 1 commit into
Conversation
|
Contributor
nachiketb-nvidia
force-pushed
the
nachiketb/feat-decision-cutoff-policy
branch
from
October 16, 2026 00:17
8482fdf to
e12b2ea
Compare
nachiketb-nvidia
force-pushed
the
nachiketb/feat-decision-cutoff-policy
branch
2 times, most recently
from
October 19, 2026 15:39
8802008 to
4dbbd9e
Compare
Signed-off-by: nachiketb <nachiketb@nvidia.com>
nachiketb-nvidia
force-pushed
the
nachiketb/feat-decision-cutoff-policy
branch
from
October 19, 2026 15:53
4dbbd9e to
93e8fba
Compare
This branch has not been deployed
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.
What and Why
Replace the binary relative-advantage implementation with one ordered routing policy. A rule names one candidate and its cutoff. The first matching rule selects that candidate; otherwise the explicit fallback is selected. The same evaluator handles two-model and N-way routing.
Review and merge order: #1013, then #1014.
Scope
This PR contains the libsy implementation, public API changes, and the existing consumer/test updates required for those changes to build and run:
DecisionJudgeConfig.policy, withDecisionPolicyand candidate-onlyDecisionRulerecords.Deployment TOMLs, the Jev benchmark profile, server documentation, and published guides are deliberately in #1014. Standalone N-way TOML model-pool registration is also in #1014. Keeping the necessary constructor and fixture migrations here avoids a first PR that breaks compilation or its existing tests. No temporary legacy cutoff adapter is added.
Breaking Changes
policy, TOMLdecision.policy, and Python'spolicyargument are required. The old top-levelcutoffis removed; thresholds live inside rules.candidateandcutoff. There are no separate score and destination labels.advantageandno_advantage. Custom instructions must use the candidate labels. Re-evaluate previous thresholds: candidate-choice and relative-advantage scores have different meanings.fail_openis true, or propagate when false. In composite routing, the explicit fallback replaces the former implicit tier-retention behavior for unavailable decision verdicts.Ordinary LLM judges and the general Decision protocol are unchanged. Merge #1014 next to migrate the shipped deployment examples.
Ordered N-way Selection
Set this on
DecisionJudgeConfig.policy, map the three labels to completion models incandidates, and register them in the runtimeanygroup alongside thejudgegroup.All scores come from one judge call. The provider's selected option and confidence do not override the policy. Missing or invalid candidate scores use the fallback. Choice scores are not calibrated task-success probabilities.
What to Review
decision.rs: policy validation, candidate selection, explicit fallback, and failure handling.decision_judge_routes_on_ordered_policy: existing binary/N-way coverage, strict cutoffs, invalid inputs, provider failures, and session affinity.Validation
No new test functions/files or dependencies. No paid provider calls. CI is not being awaited.