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.
[ab-advisor] Add model_size A/B experiment to test-quality-sentinel #43551
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[ab-advisor] Add model_size A/B experiment to test-quality-sentinel #43551
Changes from all commits
e271ccb6542a21File filter
Filter by extension
Conversations
Uh oh!
There was an error while loading. Please reload this page.
Jump to
Uh oh!
There was an error while loading. Please reload this page.
There are no files selected for viewing
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Uh oh!
There was an error while loading. Please reload this page.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The primary metric
review_usefulness_acceptance_ratehas no instrumentation path in the compiled workflow — this experiment will never collect any primary data.💡 Details
review_usefulness_acceptance_rateis set as themetric(primary KPI) for the experiment. However, nothing in the compiledtest-quality-sentinel.lock.ymlwrites this value to the experiment state artifact. The framework-collected metrics available automatically are:run_success_rate,run_duration_ms,ai_credits_total,effective_tokens. All of these appear in other experiments in the repo.A "usefulness acceptance rate" that tracks whether PR reviewers found the AI review helpful requires one of:
Without any of these, the experiment branch will accumulate runs with
review_usefulness_acceptance_ratealways null. The ab-advisor will never reach a conclusion.Also affected:
false_positive_change_request_rate(secondary metric + guardrail) has the same problem — no automatic collection mechanism — making the<=0.20guardrail permanently inert.Fix: Either replace the primary metric with one the framework collects automatically (e.g.,
run_success_rateas a proxy for now), or add a post-processing job that harvests and writes the acceptance signal. If proceeding with a manual metric, document the collection SLA.There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
false_positive_change_request_rateappears in bothsecondary_metricsandguardrail_metrics— the duplication is contradictory and signals unclear intent.💡 Details
Line 135:
secondary_metrics: [ai_credits_total, false_positive_change_request_rate]Lines 136–138:
A metric should be either a passive observation (secondary) or an active gate (guardrail), not both simultaneously. If the framework processes both lists independently, the metric is evaluated under two different semantics in the same run. If it deduplicates, one entry is silently dropped — and it's unclear which takes precedence.
Fix: Remove
false_positive_change_request_ratefromsecondary_metricsand leave it only inguardrail_metricswhere the threshold is operative:There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
min_samples: 70gives ~25% statistical power for the claimed 15pp MDE — the experiment will almost certainly produce inconclusive results.💡 Power calculation
With
min_samples: 70andweight: [50, 50], each arm gets 35 samples. For a two-proportion z-test (alpha=0.05, two-tailed), detecting a 15 percentage-point difference (the H1 threshold stated in the hypothesis) from a baseline of 0.50 requires approximately 169 samples per arm (338 total) at 80% power.At n=35 per arm, the achieved power is approximately 25% — meaning there is a 75% chance of incorrectly accepting H0 and shipping no model change even if the large model is genuinely 15pp better. Conversely, any positive result at this sample size is highly likely to be noise.
Fix: Raise
min_samplesto at least 340, or narrow the MDE to a level that is achievable within the traffic budget. If the workflow fires infrequently (e.g. ~5 PRs/day), document the expected time to reach sample size.There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
[/grill-with-docs] The experiment specifies
metric: review_usefulness_acceptance_rate(a 0–1 proportion) but omitsanalysis_type. Without it, the ab-testing reporting workflow can't automatically select the correct statistical test —proportion_test(two-proportion z-test) is the appropriate choice here and is one of the four valid values in the schema.💡 Suggested addition
Without this, any automated analysis reporter defaults to an unspecified test, which may produce misleading significance results for a proportion metric.
@copilot please address this.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
[/grill-with-docs] No
end_dateis set. Without a time bound, the experiment runs indefinitely — if statistical significance is never reached (e.g. review acceptance data is sparse), the sentinel agent silently keeps running with 50/50 assignment forever. The ab-testing-advisor guidance recommends setting an explicitend_dateto cap experiment duration.💡 Suggested addition
Based on
min_samples: 70per variant and typical PR review throughput, estimate when 140 samples will accumulate and set that as the bound:After
end_datepasses,pick_experiment.cjswill assign all runs to the control variant (small), providing a safe fallback.@copilot please address this.
Uh oh!
There was an error while loading. Please reload this page.