[Fix] Helper-model decisions answer yes/no questions with their own confidence instead of a probability - #3075
Merged
Merged
Conversation
…onfidence instead of a probability
Contributor
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.
Problem
When no hosted judgment model is configured, typed decisions fall back to the helper model. The fallback prompt asks for
{ type: 'noul', noul: number }per yes/no question but never says whatnoulis. Several small models read it as "how sure am I of my answer" and return ~0.99 whether the answer is yes or no. Every caller then sees a confident yes.This affects every surface that uses the fallback (channel launch criteria, work-kind routing, thread-reply routing, forum tags, and the rest of the decision-model list), not one feature.
Change
The fallback prompt now defines the fields:
noulis the probability that the answer is yes, a confident no is near 0, and ~0.5 is for questions the state does not settle.scoreis the zero-based index into the ordered criteria.The same definition is attached to the
noulfield of the structured-output schema.Evidence
Live probe through OpenRouter using the fallback's exact system prompt, prompt, and answer schema: 9 synthetic coding turns x 3 yes/no questions x 2 runs per model, scored against expected answers at a 0.85 threshold.
Before the change the failures were almost all false yeses at 0.95-1.00 on turns where the right answer was no. The remaining misses are borderline cases scored at 0.85-0.90.
Not addressed: helper models still snap to round numbers, so thresholds tuned on the hosted judgment model are not automatically right for the fallback, and helper latency (2-20 s) is unchanged.
Validation
typesafe-judgment.test.tspasses (44),pnpm lint:fast,pnpm check-types:fast.